{"id":"CVE-2026-58228","aliases":["CVE-2026-58228","EEF-CVE-2026-58228","GHSA-5cgh-g58j-m9cq"],"related":[],"kind":"vulnerability","state":"published","title":"Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via <.link>","summary":"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 <.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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 <.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.","source":"cvelist"},{"lang":"en","text":"## 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## Workarounds\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.","format":"markdown","source":"eef"},{"lang":"es","text":"Una vulnerabilidad de cross-site scripting en phoenixframework phoenix_live_view permite a un atacante eludir la validación del esquema de URL y ejecutar JavaScript en la sesión del navegador de una víctima.\n\nLas funciones Phoenix.LiveView.Utils.valid_destination!/2 y Phoenix.LiveView.Utils.valid_live_navigation_destination!/2 en lib/phoenix_live_view/utils.ex dependen de una función auxiliar interna uri_scheme/1 que solo detecta un esquema cuando el primer byte de la entrada es una letra ASCII. Las entradas que comienzan con un carácter de control ASCII o un espacio pasan a una cláusula que devuelve nil, lo que hace que la URL sea tratada como una ruta relativa segura.\n\nLos navegadores estándar implementan el analizador de URL WHATWG, que elimina los caracteres de control C0 y los espacios iniciales antes de analizar. Como resultado, una entrada como ’ javascript_disabled: alert(1)’ se pasa sin cambios a <.link href={...}> y, al hacer clic, es analizada por el navegador como una URL javascript_disabled: que ejecuta un script controlado por el atacante en la sesión de la víctima.\n\nLas aplicaciones que renderizan URL proporcionadas por el usuario (por ejemplo, enlaces de perfil, objetivos de redirección o referencias externas) a través de <.link href={...}> se ven afectadas.\n\nEste problema afecta a phoenix_live_view: desde la versión 1.2.2 anterior a la 1.2.7.","source":"nvd"}],"published":"2026-07-13T18:04:30.636Z","modified":"2026-11-25T17:23:14.984Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","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","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","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","score":5.1,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","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"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"1.2.2","fixed":"1.2.7","status":"affected"}],"vendor":"phoenixframework","product":"phoenix_live_view","package":"phoenix_live_view","cpe":"cpe:2.3:a:phoenixframework:phoenix_live_view:*:*:*:*:*:*:*:*","repo":"https://github.com/phoenixframework/phoenix_live_view","source":"cvelist"},{"ranges":[{"type":"git","introduced":"4b63216ae68886db99cf7772af23372d76c40e7e","fixed":"86165533e311469a1b62093fd182d9d874de8106","status":"affected"}],"vendor":"phoenixframework","product":"phoenix_live_view","package":"phoenixframework/phoenix_live_view","cpe":"cpe:2.3:a:phoenixframework:phoenix_live_view:*:*:*:*:*:*:*:*","repo":"https://github.com/phoenixframework/phoenix_live_view","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.2.2","status":"affected","fixed":"1.2.7"}],"ecosystem":"Hex","package":"phoenix_live_view","purl":"pkg:hex/phoenix_live_view","source":"eef"},{"ranges":[{"type":"git","introduced":"4b63216ae68886db99cf7772af23372d76c40e7e","status":"affected","fixed":"86165533e311469a1b62093fd182d9d874de8106"}],"repo":"https://github.com/phoenixframework/phoenix_live_view","source":"eef"}],"references":[{"url":"https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cq","tags":["advisory","exploit","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-58228.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-58228","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/phoenixframework/phoenix_live_view/commit/4b63216ae68886db99cf7772af23372d76c40e7e","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/phoenixframework/phoenix_live_view/commit/86165533e311469a1b62093fd182d9d874de8106","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/phoenix_live_view","tags":["package"],"sources":["eef"]}],"credits":["Barna Kovacs","Jonatan Männchen / EEF","José Valim","Steffen Deusch"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-07-13T18:58:11.563Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-58228","url":"https://www.cve.org/CVERecord?id=CVE-2026-58228","licence":"CVE Terms of Use","modified":"2026-11-24T05:20:41.604Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-58228","url":"https://osv.dev/vulnerability/EEF-CVE-2026-58228","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:14.984Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-58228","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58228","licence":"Public domain","modified":"2026-11-24T06:17:08.643Z"}],"updatedAt":"2026-11-25T22:59:27.841Z","epss":{"score":0.00475,"percentile":0.42663,"date":"2026-12-01T12:00:22.000Z"}}