Skip to content

Commit 6d79701

Browse files
HSEC-2026-0004: hackage-server XSS
1 parent d3ecd59 commit 6d79701

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../published/2026/HSEC-2026-0004.md
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
```toml
2+
[advisory]
3+
id = "HSEC-2026-0004"
4+
cwe = [84]
5+
keywords = ["hackage", "xss", "supply-chain"]
6+
7+
[[affected]]
8+
package = "hackage-server"
9+
cvss = "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L"
10+
11+
[[affected.versions]]
12+
introduced = "0.1"
13+
14+
[[references]]
15+
type = "FIX"
16+
url = "https://github.com/haskell/hackage-server/commit/2de3ae45082f8f3f29a41f6aff620d09d0e74058"
17+
```
18+
19+
# Hackage package metadata stored XSS vulnerability
20+
21+
User-controlled metadata from `.cabal` files are rendered into HTML
22+
`href` attributes without proper sanitization, enabling stored
23+
Cross-Site Scripting (XSS) attacks. The specific fields affected
24+
are:
25+
26+
- `homepage`
27+
- `bug-reports`
28+
- `source-repository.location`
29+
- `description` (Haddock hyperlinks)
30+
31+
The Haskell Security Response Team audited the entire corpus of
32+
**published** packages on `hackage.haskell.org`—all published
33+
package versions but *not* candidates. No exploitation attempts
34+
were detected.
35+
36+
To fix the issue, *hackage-server* now inspects target URIs and only
37+
produces a hyperlink when the URI has an approved scheme: `http`,
38+
`https`, and (only for some fields) `mailto`.
39+
40+
The fix has been [committed][commit] and deployed on
41+
`hackage.haskell.org`. Other operations of *hackage-server*
42+
instances should update as soon as possible to commit
43+
`2de3ae45082f8f3f29a41f6aff620d09d0e74058` or later.
44+
45+
## Acknowledgements
46+
47+
- **Joshua Rogers** (https://joshua.hu/) of AISLE
48+
(https://aisle.com/) reported the issue to the Haskell Security
49+
Response Team.
50+
- **Fraser Tweedale** implemented the fix.
51+
- **Gershom Bazerman** merged the fix and deployed it to
52+
`hackage.haskell.org`.
53+
54+
[commit]: https://github.com/haskell/hackage-server/commit/2de3ae45082f8f3f29a41f6aff620d09d0e74058

advisories/reserved/2026/HSEC-2026-0004.md

Whitespace-only changes.

0 commit comments

Comments
 (0)