{"affected":[{"package":{"ecosystem":"Hex","name":"phoenix_live_view","purl":"pkg:hex/phoenix_live_view"},"ranges":[{"events":[{"introduced":"1.2.2"},{"fixed":"1.2.7"}],"type":"SEMVER"}],"versions":["1.2.2","1.2.3","1.2.4","1.2.5","1.2.6"]},{"ranges":[{"events":[{"introduced":"4b63216ae68886db99cf7772af23372d76c40e7e"},{"fixed":"86165533e311469a1b62093fd182d9d874de8106"}],"repo":"https://github.com/phoenixframework/phoenix_live_view","type":"GIT"}]}],"aliases":["GHSA-5cgh-g58j-m9cq","CVE-2026-58228"],"credits":[{"name":"Barna Kovacs","type":"FINDER"},{"name":"Steffen Deusch","type":"REMEDIATION_DEVELOPER"},{"name":"José Valim","type":"ANALYST"},{"name":"Jonatan Männchen / EEF","type":"ANALYST"}],"database_specific":{"capec_ids":["CAPEC-63"],"cpe_ids":["cpe:2.3:a:phoenixframework:phoenix_live_view:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-79"]},"details":"## Summary\n\nCross-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 <.link href={...}> 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 <.link href={...}> are affected.\n\nThis issue affects phoenix\\_live\\_view: from 1.2.2 before 1.2.7.\n\n## Workaround\n\nStrip leading ASCII control and space bytes (code points 0x00 through 0x20) from any untrusted URL before passing it to <.link href={...}>, or reject such inputs outright. This aligns application-level validation with the WHATWG URL parser used by browsers and prevents the scheme-detection bypass.","id":"EEF-CVE-2026-58228","modified":"2026-07-13T18:04:30.636Z","published":"2026-07-13T18:04:30.636Z","references":[{"type":"ADVISORY","url":"https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cq"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-58228.html"},{"type":"FIX","url":"https://github.com/phoenixframework/phoenix_live_view/commit/86165533e311469a1b62093fd182d9d874de8106"},{"type":"PACKAGE","url":"https://hex.pm/packages/phoenix_live_view"}],"related":[],"schema_version":"1.7.3","severity":[{"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","type":"CVSS_V4"}],"summary":"Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via <.link>","upstream":[]}