CVE-2021-46871
phoenix_html allows Cross-site Scripting in HEEx class attributes
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
6.1
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.
- Record
CVE-2021-46871- 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE List
6.1
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.
- Record
CVE-2021-46871- 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2023-0339
6.1
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.
- Record
EUVD-2023-0339- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5g2h-9x5v-5h3x
6.1
phoenix_html allows Cross-site Scripting in HEEx class attributes
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes
- Record
GHSA-5g2h-9x5v-5h3x- 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j3gg-r6gp-95q2 No score
XSS in HEEx class attributes
The class attribute was not protected against XSS attacks when using HEEx.
- Record
GHSA-j3gg-r6gp-95q2- Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.1
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.
- Record
CVE-2021-46871- 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 - Updated
- 2026-11-02
OSVGHSA-5g2h-9x5v-5h3x
6.1
phoenix_html allows Cross-site Scripting in HEEx class attributes
tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes
- Record
GHSA-5g2h-9x5v-5h3x- 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 - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-j3gg-r6gp-95q2 No score
XSS in HEEx class attributes
The class attribute was not protected against XSS attacks when using HEEx.
- Record
GHSA-j3gg-r6gp-95q2- Weakness
- CWE-79
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
phoenix_htmlnpm |
before 3.0.4 | 3.0.4 |
phoenix_htmlHex |
before 3.0.4 | 3.0.4 |
phoenix_htmlHex |
before 3.0.4, plus listed versions 1.0.01.0.11.1.01.2.01.2.1 Show 45 moreShow less1.3.01.4.02.0.02.0.0-dev2.0.12.1.02.1.12.1.22.10.02.10.12.10.22.10.32.10.42.10.52.11.02.11.12.11.22.12.02.13.02.13.12.13.22.13.32.13.42.14.02.14.12.14.22.14.32.2.02.3.02.3.12.4.02.4.0-dev2.5.02.5.12.6.02.6.12.6.22.7.02.7.0-dev2.8.02.9.02.9.12.9.22.9.33.0.0 |
3.0.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-46871 is a medium vulnerability (CVSS 6.1) in Phoenixframework Phoenix Html, published April 12, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in phoenix_html 3.0.4.
References
Left out here: 3 versions. The JSON record has them.