CVE-2021-46871
JavaScript vulnerability analysis and mitigation

Overview

CVE-2021-46871 affects Phoenix.HTML (also known as phoenix_html) versions before 3.0.4. The vulnerability is related to Cross-Site Scripting (XSS) in HEEx class attributes, where the class attribute was not properly protected against XSS attacks when using HEEx (GitHub Advisory). The vulnerability was disclosed and assigned a CVSS v3.1 base score of 6.1 (Medium severity) (NVD).

Technical details

The vulnerability exists in the tag.ex component of Phoenix.HTML where class attributes in HEEx templates were not properly escaped, potentially allowing for XSS attacks. The CVSS v3.1 vector string is CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N, indicating that the vulnerability is network exploitable, requires low attack complexity, needs no privileges, but does require user interaction (NVD). The issue was fixed by ensuring proper escaping of class attribute values in the HEEx implementation (Phoenix Commit).

Impact

The vulnerability could allow an attacker to execute cross-site scripting attacks through class attributes in HEEx templates. This could potentially lead to the disclosure of sensitive information or manipulation of web content presented to users (NVD).

Mitigation and workarounds

The vulnerability has been fixed in Phoenix.HTML version 3.0.4. Users should upgrade to this version or later to mitigate the risk. The fix involves proper escaping of class attribute values in HEEx templates (GitHub Advisory, Phoenix Commit).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management