{"id":"CVE-2026-58228","summary":"Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via \u003c.link\u003e","details":"Cross-site scripting vulnerability in phoenixframework phoenix_live_view allows an attacker to bypass URL scheme validation and execute JavaScript in a victim's browser session.\n\nThe Phoenix.LiveView.Utils.valid_destination!/2 and Phoenix.LiveView.Utils.valid_live_navigation_destination!/2 functions in lib/phoenix_live_view/utils.ex rely on an internal uri_scheme/1 helper that only detects a scheme when the input's first byte is an ASCII letter. Inputs beginning with an ASCII control character or space fall through to a nil-returning clause, causing the URL to be treated as a safe relative path.\n\nStandard browsers implement the WHATWG URL parser, which strips leading C0 control and space characters before parsing. As a result, an input such as \" javascript:alert(1)\" is passed unchanged into \u003c.link href={...}\u003e and, when clicked, is parsed by the browser as a javascript: URL that executes attacker-controlled script in the victim's session.\n\nApplications that render user-supplied URLs (for example profile links, redirect targets, or external references) via \u003c.link href={...}\u003e are affected.\n\nThis issue affects phoenix_live_view: from 1.2.2 before 1.2.7.","aliases":["EEF-CVE-2026-58228","GHSA-5cgh-g58j-m9cq"],"modified":"2026-07-16T03:46:36.465830814Z","published":"2026-07-13T18:04:30.636Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58228.json","unresolved_ranges":[{"extracted_events":[{"introduced":"4b63216ae68886db99cf7772af23372d76c40e7e"},{"fixed":"86165533e311469a1b62093fd182d9d874de8106"}],"source":"AFFECTED_FIELD"}],"cna_assigner":"EEF","cwe_ids":["CWE-79"]},"references":[{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-58228.html"},{"type":"WEB","url":"https://github.com"},{"type":"WEB","url":"https://osv.dev/vulnerability/EEF-CVE-2026-58228"},{"type":"WEB","url":"https://repo.hex.pm"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58228.json"},{"type":"ADVISORY","url":"https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58228"},{"type":"FIX","url":"https://github.com/phoenixframework/phoenix_live_view/commit/86165533e311469a1b62093fd182d9d874de8106"},{"type":"PACKAGE","url":"https://github.com/phoenixframework/phoenix_live_view"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/phoenixframework/phoenix_live_view","events":[{"introduced":"5789176010e4456a28c7d84b9f19ff9d7b4a93ee"},{"fixed":"2570f650c2cc6f2ff925f7f498516c3053ebd9b0"},{"fixed":"86165533e311469a1b62093fd182d9d874de8106"}],"database_specific":{"source":["DESCRIPTION","REFERENCES"],"extracted_events":[{"introduced":"1.2.2"},{"fixed":"1.2.7"}]}}],"versions":["v1.2.6","v1.2.5","v1.2.4","v1.2.3","v1.2.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-58228.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:H/SI:H/SA:N"}]}