# CVE-2021-46871: phoenix_html allows Cross-site Scripting in HEEx class attributes

- Severity: Medium 6.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 31% of CVEs (2026-11-30)
- Published: 2022-04-12T20:22:57.000Z
- Modified: 2026-09-10T03:49:56.603Z
- Also known as: GHSA-5g2h-9x5v-5h3x, GHSA-j3gg-r6gp-95q2
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: mitre

## Description

tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- phoenix_html (npm): before 3.0.4
- phoenix_html (Hex): before 3.0.4
- phoenixframework phoenix_html: before 3.0.4

## Every score

- CISA-ADP: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: rating Medium
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/advisories/GHSA-j3gg-r6gp-95q2> (advisory, patch, third-party-advisory)
- <https://github.com/phoenixframework/phoenix_html/commit/62a0139fb716bcdce697f6221244bd81d321d620> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-46871> (advisory)
- <https://github.com/phoenixframework/phoenix_html> (package, web)

## Sources

- CVE List: [CVE-2021-46871](https://www.cve.org/CVERecord?id=CVE-2021-46871), CVE Terms of Use, modified 2025-04-09
- GitHub Advisory Database: [GHSA-5g2h-9x5v-5h3x](https://github.com/advisories/GHSA-5g2h-9x5v-5h3x), CC-BY-4.0, modified 2026-09-10
- GitHub Advisory Database: [GHSA-j3gg-r6gp-95q2](https://github.com/advisories/GHSA-j3gg-r6gp-95q2), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2021-46871](https://nvd.nist.gov/vuln/detail/CVE-2021-46871), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-46871 · Whole record: https://cve.day/CVE-2021-46871.json · Rebuilt by cve.day 2026-11-25T22:58:08.101Z
