{"id":"CVE-2026-58228","aliases":["EEF-CVE-2026-58228","EUVD-2026-43515","GHSA-5cgh-g58j-m9cq"],"status":"published","title":"Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via \u003c.link\u003e","description":"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.","severity":{"version":"4.0","score":5.1,"vector":"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00475,"percentile":0.41489,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2026-07-13T18:04:30Z","modified":"2026-10-28T02:30:31Z","fixes":[{"ecosystem":"Hex","package":"phoenix_live_view","fixed_in":["1.2.7"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Hex","package":"phoenix_live_view","ranges":[{"type":"SEMVER","events":[{"introduced":"1.2.2"},{"fixed":"1.2.7"}]}],"versions":["1.2.2","1.2.3","1.2.4","1.2.5","1.2.6"]}],"products":[{"vendor":"phoenixframework","product":"phoenix_live_view"}],"references":[{"url":"https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cq","tags":["vendor-advisory","related","exploit","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-58228.html","tags":["related","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-58228","tags":["related","web"]},{"url":"https://github.com/phoenixframework/phoenix_live_view/commit/86165533e311469a1b62093fd182d9d874de8106","tags":["patch","fix"]},{"url":"https://github.com","tags":["web"]},{"url":"https://repo.hex.pm","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58228.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58228","tags":["advisory"]},{"url":"https://github.com/phoenixframework/phoenix_live_view","tags":["package"]},{"url":"https://hex.pm/packages/phoenix_live_view","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-58228","title":"Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via \u003c.link\u003e","description":"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.","status":"published","published":"2026-07-13T18:04:30.636Z","modified":"2026-07-14T04:15:01.996Z","cvss":[{"version":"4.0","score":5.1,"vector":"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","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T13:47:28.691429Z"}],"euvd":[{"id":"EUVD-2026-43515","description":"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.","status":"published","published":"2026-07-13T18:04:30Z","modified":"2026-07-14T04:15:01Z","cvss":[{"version":"4.0","score":5.1,"vector":"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","level":"medium"}],"updated_at":"2026-11-02T18:20:00.696533Z"}],"nvd":[{"id":"CVE-2026-58228","description":"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.","status":"published","published":"2026-07-13T19:17:30.317Z","modified":"2026-10-24T22:10:00.21Z","cvss":[{"version":"4.0","score":5.1,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:12:29.114188Z"}],"osv":[{"id":"CVE-2026-58228","title":"Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via \u003c.link\u003e","description":"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.","status":"published","published":"2026-07-13T18:04:30.636Z","modified":"2026-10-28T02:30:31.296582192Z","cvss":[{"version":"4.0","score":5.1,"vector":"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","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:45:12.016252Z"},{"id":"EEF-CVE-2026-58228","title":"Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via \u003c.link\u003e","description":"## 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 \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.\n\n## Workarounds\n\nStrip leading ASCII control and space bytes (code points 0x00 through 0x20) from any untrusted URL before passing it to \u003c.link href={...}\u003e, or reject such inputs outright. This aligns application-level validation with the WHATWG URL parser used by browsers and prevents the scheme-detection bypass.","status":"published","published":"2026-07-13T18:04:30.636Z","modified":"2026-09-08T03:45:08.391237075Z","cvss":[{"version":"4.0","score":5.1,"vector":"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","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:33.520522Z"}]}}
