{"id":"CVE-2021-46871","aliases":["CVE-2021-46871","GHSA-5g2h-9x5v-5h3x","GHSA-j3gg-r6gp-95q2"],"related":[],"kind":"vulnerability","state":"published","title":"phoenix_html allows Cross-site Scripting in HEEx class attributes","summary":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.","source":"cvelist"},{"lang":"en","text":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes","format":"markdown","source":"ghsa"},{"lang":"en","text":"The `class` attribute was not protected against XSS attacks when using HEEx.","format":"markdown","source":"ghsa"},{"lang":"es","text":"tag.ex en Phoenix Phoenix.HTML (también conocido como phoenix_html) anterior a 3.0.4 permite XSS en atributos de clase HEEx.","source":"nvd"}],"published":"2022-04-12T20:22:57.000Z","modified":"2026-09-10T03:49:56.603Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.4"}],"ecosystem":"npm","package":"phoenix_html","purl":"pkg:npm/phoenix_html","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.4"}],"ecosystem":"Hex","package":"phoenix_html","purl":"pkg:hex/phoenix_html","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.4"}],"ecosystem":"Hex","package":"phoenix_html","purl":"pkg:hex/phoenix_html","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.0.4"}],"vendor":"phoenixframework","product":"phoenix_html","cpe":"cpe:2.3:a:phoenixframework:phoenix_html:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/advisories/GHSA-j3gg-r6gp-95q2","tags":["advisory","patch","third-party-advisory","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/phoenixframework/phoenix_html/commit/62a0139fb716bcdce697f6221244bd81d321d620","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46871","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/phoenixframework/phoenix_html","tags":["package","web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-09T17:20:34.911Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-46871","url":"https://www.cve.org/CVERecord?id=CVE-2021-46871","licence":"CVE Terms of Use","modified":"2025-04-09T17:21:41.118Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5g2h-9x5v-5h3x","url":"https://github.com/advisories/GHSA-5g2h-9x5v-5h3x","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:56.603Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j3gg-r6gp-95q2","url":"https://github.com/advisories/GHSA-j3gg-r6gp-95q2","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:18.181Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-46871","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46871","licence":"Public domain","modified":"2026-06-17T04:15:41.650Z"}],"updatedAt":"2026-11-25T22:58:08.101Z","epss":{"score":0.0045,"percentile":0.31025,"date":"2026-11-30T12:00:22.000Z"}}