Skip to main content

phoenix_html CVE-2026-117645

| EUVDEUVD-2026-114454 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-30 EEF GHSA-jwcv-27cf-c7j5
5.3
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply untrusted value used as an attribute name
  2. Delivery
    Craft key with whitespace or quotes (e.g. 'x onmouseover=...')
  3. Exploit
    Render via HEEx {@attrs} breaking out of the attribute
  4. Execution
    Inject event handler/script into HTML
  5. Impact
    Execute script in victim browser on interaction

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the affected application to construct HTML attribute *keys* (names) from untrusted input and then render them through HEEx <tag {@attrs}>, content_tag/3, or a direct Phoenix.HTML.attributes_escape/1 call (before 3.0.0, the equivalent code in Phoenix.HTML.Tag); nested data, aria, and phx keys follow the same vulnerable paths. It does NOT affect the default/typical pattern of passing untrusted attribute *values*, which remain correctly escaped. Limiting factors: a victim must load and interact with the rendered page (UI:P/UI:R), and the impact is bounded to in-browser script execution (low confidentiality/integrity, no availability). The determinative precondition is the non-default developer pattern of deriving attribute names from user data - applications that never do this are not exploitable even on affected versions.

Impact

This is a genuine but conditional XSS (CWE-79) in a core Elixir/Phoenix library, and the signals point to moderate rather than urgent real-world risk. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P, VC:L/VI:L) describes a network-reachable, low-complexity, unauthenticated flaw needing passive user interaction, scored 5.3 - consistent with a reflected/stored XSS of limited confidentiality and integrity impact. The vuln.today decision label is 'this_month' (not act_now/emergency), there is no CISA KEV entry and no EPSS score in the input, and no public exploit or PoC reference is provided (the listed GitHub links are the vendor patch and source commits, not exploit code). The dominant risk limiter is architectural: per the description and source evidence, the application is only affected if it builds HTML attribute *names* (keys) from untrusted input and renders them via HEEx <tag {@attrs}>, content_tag/3, or a direct call to Phoenix.HTML.attributes_escape/1 - an uncommon coding pattern, since attribute values (the usual injection surface) are correctly escaped. So despite the PR:N network vector, exploitability depends on a specific, non-default application behavior rather than on reaching a default install. Net: treat as a standard-priority patch for Phoenix/Elixir shops, elevated only for apps known to derive attribute keys from user data.

Exploit ScenarioDerived

An Elixir/Phoenix application renders a dynamic attribute map whose keys originate from user-controlled data (for example user-supplied data-*/aria-* names) through HEEx {@attrs} or content_tag/3. An attacker submits a key such as x onmouseover=alert(document.cookie) (binary key) or an atom key containing quotes and >, which attributes_escape/1 does not neutralize in the key position, so the rendered markup gains an injected event handler or element. A victim who loads and interacts with the page (UI:P) triggers script execution in their browser session; no public exploit was identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 30, 2026

Cross-site scripting in phoenix_html (from 1.0.0 before 3.3.5, and from 4.0.0 before 4.4.0) allows attackers who control HTML attribute names to break out of an attribute and inject new attributes or script into rendered markup. Only attribute keys are mishandled - attribute values are escaped correctly - so applications are exposed solely when they derive attribute names from untrusted input and render them through HEEx <tag {@attrs}>, content_tag/3, or a direct Phoenix.HTML.attributes_escape/1 call (before 3.0.0 the same code lived in Phoenix.HTML.Tag). No public exploit identified at time of analysis; the victim must load the rendered page, and vendor fixes are available in 3.3.5 and 4.4.0.

RemediationAI

Upgrade phoenix_html to 3.3.5 or 4.4.0, the versions in which the attribute-name escaping defect is fixed; the corresponding changes are in commits 6ad3a1d7960891a468d54636054a98e11dfb5111, d9e4e6b2d9be49e25fb6d6b4fdbb2008174f01a6, and a47dc8944a773b7e9273d9691dc6744ec793f1de (see the advisory at https://cna.erlef.org/cves/CVE-2026-117645.html). Because exploitation depends on the non-default pattern of deriving attribute names from user data, the compensating control is to stop doing that: construct attribute keys only from static atoms or a fixed allowlist, and never let request, database, or other untrusted data supply a key passed to HEEx <tag {@attrs}>, content_tag/3, or Phoenix.HTML.attributes_escape/1, including inside nested data, aria, and phx maps. Applications that already keep attribute names static need no workaround, but should still upgrade to pick up the corrected escaping.

Affected VersionsENISA

phoenix_html 6ad3a1d7960891a468d54636054a98e11dfb5111 <*
phoenix_html 1.0.0 <3.3.5
phoenix_html 4.0.0 <4.4.0

Affected Packages

euvd phoenix_html fix: 3.3.5, 4.4.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

phoenix_html is the HTML-safety and tag-generation library extracted from the Elixir Phoenix framework; it provides the ~e sigil, safe/unsafe HTML handling, and the tag helpers used by HEEx templates. The root cause is CWE-79: attributes_escape/1 escapes attribute values but not attribute names. Its key_escape/1 helper passes a binary key through html_escape, which neutralizes quotes and angle brackets but not whitespace, so a key such as x onmouseover terminates the current attribute and begins a new one. Atom keys take a different path - they are only dasherized, so any character, including quotes and >, survives into the output. Nested data, aria, and phx keys follow the same vulnerable paths. In versions before 3.0.0 the equivalent code resided in Phoenix.HTML.Tag. The practical consequence is that a rendered element can gain attacker-chosen event handlers or additional attributes, yielding script execution in the victim's browser under the origin of the affected application's page.

Know when Phoenix Html gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (EEF) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 6.1 MEDIUM

Standard XSS: network reachable, no attacker privileges (PR:N) and victim interaction required (UI:R); script runs in the browser (S:C) with limited C/I and no availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in phoenixframework phoenix_html allows an attacker who controls attribute names to inject attributes and script into rendered HTML via Phoenix.HTML.attributes_escape/1.

attributes_escape/1 in lib/phoenix_html.ex escapes attribute values but not attribute names. key_escape/1 passes a binary key through html_escape, which neutralizes quotes and angle brackets but not whitespace, so a key such as x onmouseover ends the attribute and starts a new one. An atom key is only dasherized, so any character passes, including quotes and >. Nested data, aria and phx keys take the same paths. An application is affected when it builds attribute keys from untrusted input and renders them through HEEx <tag {@attrs}>, content_tag/3, or a direct call. Before 3.0.0 the same code lived in Phoenix.HTML.Tag.

This issue affects phoenix_html: from 1.0.0 before 3.3.5 and from 4.0.0 before 4.4.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 76% exploitable
Prevalence
Medium
core HTML library of the Phoenix/Elixir web ecosystem; moderate overall footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy