{"id":"CVE-2026-40470","state":"PUBLISHED","title":"Hackage package and doc upload stored XSS vulnerability","description":"A critical XSS vulnerability affected hackage-server and\nhackage.haskell.org.  HTML and JavaScript files provided in source\npackages or via the documentation upload facility were served\nas-is on the main hackage.haskell.org domain.  As a consequence,\nwhen a user with latent HTTP credentials browses to the package\npages or documentation uploaded by a malicious package maintainer,\ntheir session can be hijacked to upload packages or\ndocumentation, amend maintainers or other package metadata, or\nperform any other action the user is authorised to do.","publishedAt":"2026-04-23T14:53:47.724Z","updatedAt":"2026-04-23T16:22:27.341Z","severity":{"score":9.9,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L","source":"redhat-cnalr"},"assigner":"redhat-cnalr","products":["hackage-server"],"affected":[{"packageName":"hackage-server","defaultStatus":"unaffected","versions":[{"version":"0.1","status":"affected","lessThan":"0.6","versionType":"semver"}],"collectionURL":"https://hackage.haskell.org/package/hackage-server"}],"references":["https://osv.dev/vulnerability/HSEC-2024-0004"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/40xxx/CVE-2026-40470.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-40470","state":"PUBLISHED","datePublished":"2026-04-23T14:53:47.724Z","dateUpdated":"2026-04-23T16:22:27.341Z","assignerShortName":"redhat-cnalr","assignerOrgId":"74b3a70d-cca6-4d34-9789-e83b222ae3be","dateReserved":"2026-04-13T15:23:17.067Z"},"containers":{"cna":{"title":"Hackage package and doc upload stored XSS vulnerability","descriptions":[{"lang":"en","value":"A critical XSS vulnerability affected hackage-server and\nhackage.haskell.org.  HTML and JavaScript files provided in source\npackages or via the documentation upload facility were served\nas-is on the main hackage.haskell.org domain.  As a consequence,\nwhen a user with latent HTTP credentials browses to the package\npages or documentation uploaded by a malicious package maintainer,\ntheir session can be hijacked to upload packages or\ndocumentation, amend maintainers or other package metadata, or\nperform any other action the user is authorised to do."}],"affected":[{"packageName":"hackage-server","defaultStatus":"unaffected","versions":[{"version":"0.1","status":"affected","lessThan":"0.6","versionType":"semver"}],"collectionURL":"https://hackage.haskell.org/package/hackage-server"}],"references":[{"url":"https://osv.dev/vulnerability/HSEC-2024-0004"}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"LOW","baseSeverity":"CRITICAL","baseScore":9.9,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79 Improper neutralization of input during web page generation ('cross-site scripting')","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat-cnalr","orgId":"74b3a70d-cca6-4d34-9789-e83b222ae3be","dateUpdated":"2026-04-23T14:53:47.724Z"},"datePublic":"2026-01-16T14:18:00.000Z","x_generator":{"engine":"Vulnogram 1.0.1"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-23T16:19:40.142224Z","id":"CVE-2026-40470","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-23T16:22:27.341Z"}}]}}}