Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via <.link>
CVE-2026-58228Published 13 Jul 2026, 18:04 UTC
Real-world risk
0.9/ 10Low
Routine
If the vulnerable configuration applies to you: 2.0
PreliminaryFrom the CVSS vector only · confidence low
CVSS
5.1
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from EEF)
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. The 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. Standard 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. Applications that render user-supplied URLs (for example profile links, redirect targets, or external references) via <.link href={...}> are affected. This issue affects phoenix_live_view: from 1.2.2 before 1.2.7.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| phoenixNiche | >= 1.2.2, < 1.2.7 | 1.2.7 |
What to do
Update to a fixed version: 1.2.7.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T3: Public proof of concept (× 0.95)
A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit
- Reference tagged as exploit (link)
- CISA SSVC: proof of concept
EPSS 0.5% chance of exploitation in 30 days (percentile 43), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T3: Public proof of concept0.950
- 10 × impact 0.3 × prerequisites 0.315 × threat 0.950.898
- Rounded to one decimal between 0.1 and 100.9
Exploitation and evidence timeline
- 13 Jul 2026 Published
- 3 Dec 2026 Reference tagged as exploit first seen
- 3 Dec 2026 CISA SSVC: proof of concept first seen
- 3 Dec 2026 Risk 0.9 (cvss fallback)
Weakness
CWE-79
References
- https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cqexploit, related, vendor-advisory
- https://cna.erlef.org/cves/CVE-2026-58228.htmlrelated
- https://osv.dev/vulnerability/EEF-CVE-2026-58228related
- https://github.com/phoenixframework/phoenix_live_view/commit/4b63216ae68886db99cf7772af23372d76c40e7erelated
- https://github.com/phoenixframework/phoenix_live_view/commit/86165533e311469a1b62093fd182d9d874de8106patch
- CVE-2026-58228 on CVE.org