{"id":"CVE-2021-46871","aliases":["EUVD-2023-0339","GHSA-5g2h-9x5v-5h3x","GHSA-j3gg-r6gp-95q2"],"status":"published","title":"phoenix_html allows Cross-site Scripting in HEEx class attributes","description":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.0045,"percentile":0.39423,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2022-04-12T20:22:57Z","modified":"2026-10-20T10:55:11Z","fixes":[{"ecosystem":"npm","package":"phoenix_html","fixed_in":["3.0.4"],"sources":["ghsa","osv"]},{"ecosystem":"Hex","package":"phoenix_html","fixed_in":["3.0.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"phoenix_html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.4"}]}]},{"source":"ghsa","ecosystem":"Hex","package":"phoenix_html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.4"}]}]},{"source":"ghsa","ecosystem":"Hex","package":"phoenix_html","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.4"}]}]},{"source":"osv","ecosystem":"npm","package":"phoenix_html","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.0.4"}]}]},{"source":"osv","ecosystem":"Hex","package":"phoenix_html","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.0.4"}]}],"versions":["1.0.0","1.0.1","1.1.0","1.2.0","1.2.1","1.3.0","1.4.0","2.0.0","2.0.0-dev","2.0.1","2.1.0","2.1.1","2.1.2","2.10.0","2.10.1","2.10.2","2.10.3","2.10.4","2.10.5","2.11.0","2.11.1","2.11.2","2.12.0","2.13.0","2.13.1","2.13.2","2.13.3","2.13.4","2.14.0","2.14.1","2.14.2","2.14.3","2.2.0","2.3.0","2.3.1","2.4.0","2.4.0-dev","2.5.0","2.5.1","2.6.0","2.6.1","2.6.2","2.7.0","2.7.0-dev","2.8.0","2.9.0","2.9.1","2.9.2","2.9.3","3.0.0","3.0.1","3.0.2","3.0.3"]},{"source":"osv","ecosystem":"Hex","package":"phoenix_html","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.0.4"}]}],"versions":["1.0.0","1.0.1","1.1.0","1.2.0","1.2.1","1.3.0","1.4.0","2.0.0","2.0.0-dev","2.0.1","2.1.0","2.1.1","2.1.2","2.10.0","2.10.1","2.10.2","2.10.3","2.10.4","2.10.5","2.11.0","2.11.1","2.11.2","2.12.0","2.13.0","2.13.1","2.13.2","2.13.3","2.13.4","2.14.0","2.14.1","2.14.2","2.14.3","2.2.0","2.3.0","2.3.1","2.4.0","2.4.0-dev","2.5.0","2.5.1","2.6.0","2.6.1","2.6.2","2.7.0","2.7.0-dev","2.8.0","2.9.0","2.9.1","2.9.2","2.9.3","3.0.0","3.0.1","3.0.2","3.0.3"]}],"products":[{"vendor":"phoenixframework","product":"phoenix_html"}],"references":[{"url":"https://github.com/advisories/GHSA-j3gg-r6gp-95q2","tags":["x_transferred","Patch","Third Party Advisory","fix","advisory"]},{"url":"https://github.com/phoenixframework/phoenix_html/commit/62a0139fb716bcdce697f6221244bd81d321d620","tags":["x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46871","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-5g2h-9x5v-5h3x"},{"url":"https://github.com/phoenixframework/phoenix_html","tags":["web","package"]}],"sources":{"cve":[{"id":"CVE-2021-46871","description":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.","status":"published","published":"2023-01-10T00:00:00Z","modified":"2025-04-09T17:21:41.118Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"adp"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:33:02.930115Z"}],"euvd":[{"id":"EUVD-2023-0339","description":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.","status":"published","published":"2023-01-10T00:00:00Z","modified":"2025-04-09T17:21:41Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T20:52:38.263259Z"}],"ghsa":[{"id":"GHSA-5g2h-9x5v-5h3x","title":"phoenix_html allows Cross-site Scripting in HEEx class attributes","description":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes","status":"published","published":"2023-01-10T06:30:25Z","modified":"2023-04-06T22:57:42Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:50.476488Z"},{"id":"GHSA-j3gg-r6gp-95q2","title":"XSS in HEEx class attributes","description":"The `class` attribute was not protected against XSS attacks when using HEEx.","status":"published","published":"2022-04-12T20:22:57Z","modified":"2023-01-11T05:06:46Z","cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:13.23016Z"}],"nvd":[{"id":"CVE-2021-46871","description":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.","status":"published","published":"2023-01-10T06:15:09.87Z","modified":"2026-06-17T04:15:41.65Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:07:07.323379Z"}],"osv":[{"id":"CVE-2021-46871","description":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes.","status":"published","published":"2023-01-10T06:15:09.87Z","modified":"2026-10-20T10:55:11.818072971Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:22.18434Z"},{"id":"GHSA-5g2h-9x5v-5h3x","title":"phoenix_html allows Cross-site Scripting in HEEx class attributes","description":"tag.ex in Phoenix Phoenix.HTML (aka phoenix_html) before 3.0.4 allows XSS in HEEx class attributes","status":"published","published":"2023-01-10T06:30:25Z","modified":"2026-09-10T03:49:56.60367608Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:38.213481Z"},{"id":"GHSA-j3gg-r6gp-95q2","title":"XSS in HEEx class attributes","description":"The `class` attribute was not protected against XSS attacks when using HEEx.","status":"published","published":"2022-04-12T20:22:57Z","modified":"2026-09-10T03:49:18.181417321Z","cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:49.977351Z"}]}}
