{"id":"CVE-2026-117645","published":"2026-10-30T20:25:06Z","modified":"2026-11-20T05:59:50Z","title":"Phoenix.HTML vulnerable to attribute injection via unvalidated attribute names in attributes_escape/1","vendor":"phoenixframework","product":"phoenix_html","tier":"tail","description":{"text":"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.\n\nattributes_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.\n\nThis issue affects phoenix_html: from 1.0.0 before 3.3.5 and from 4.0.0 before 4.4.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00315,"percentile":0.25063,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-117645.html","tags":["related","third-party-advisory"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-117645","tags":["related"]},{"url":"https://github.com/phoenixframework/phoenix_html/commit/6ad3a1d7960891a468d54636054a98e11dfb5111","tags":["related"]},{"url":"https://github.com/phoenixframework/phoenix_html/commit/a47dc8944a773b7e9273d9691dc6744ec793f1de","tags":["patch"]},{"url":"https://github.com/phoenixframework/phoenix_html/commit/d9e4e6b2d9be49e25fb6d6b4fdbb2008174f01a6","tags":["patch"]}],"priority":{"score":8.7,"factors":[{"name":"EPSS percentile","points":5.01},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"phoenixframework","affectedVersions":[{"vendor":"phoenixframework","product":"phoenix_html","versions":[">= 1.0.0, < 3.3.5",">= 4.0.0, < 4.4.0"]},{"vendor":"phoenixframework","product":"phoenix_html","versions":[">= 6ad3a1d7960891a468d54636054a98e11dfb5111"]}],"fixedVersions":[{"vendor":"phoenixframework","product":"phoenix_html","versions":["a47dc8944a773b7e9273d9691dc6744ec793f1de","d9e4e6b2d9be49e25fb6d6b4fdbb2008174f01a6"]}],"workarounds":{"items":["Do not derive attribute names from untrusted input. Where dynamic attribute keys are needed, check each key against an allow list, or against a pattern such as ^[a-zA-Z][a-zA-Z0-9:._-]*$, before passing the map to attributes_escape/1 or a HEEx {@attrs} expression. Do not create atoms from request data."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-63","name":"An attacker who can influence the attribute names an application renders can add event-handler attributes or close the tag and run script in the browser of every user who views the page."}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-11-06T16:01:55.707158Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-114454","exploited":false,"provenance":"source"}}