phoenix_html allows Cross-site Scripting in HEEx class attributesGHSA-5g2h-9x5v-5h3x
MEDIUMFix: phoenixframework/phoenix_html@62a0139GHSA-5g2h-9x5v-5h3x is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in phoenix_html. A fix is available for phoenix_html — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-5g2h-9x5v-5h3x.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
phoenix_html📦phoenix_htmlReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Hex, npm packages — download data is not available via public APIs for these ecosystems.
Description
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💧Hex | phoenix_html | all versions | 3.0.4mix deps.update phoenix_html |
| 📦npm | phoenix_html | all versions | 3.0.4npm install phoenix_html@3.0.4 |
Affected Products
phoenix htmlphoenixframeworkDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phoenix_html, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update phoenix_html to 3.0.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5g2h-9x5v-5h3x is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is GHSA-5g2h-9x5v-5h3x in your dependencies?
Find it across Hex, npm, including transitive dependencies.