Hex
CVE-2026-58228
Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via <.link>
- Severity
- Medium 5.1
- Published
- 13 Jul 2026
- Last changed
- 24 Nov 2026
- Added to UpHeron
- 24 Nov 2026
- Fixed in
- 1.2.7
- Exploit chance
- 0.5% in the next 30 daysHigher than 41% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- Cross-site scripting (CWE-79)
- Attack
- Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
- Attacker can
- Read some data · Change some data
- CVSS 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- Sources
- CVE Program
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.
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.
Affected software
| Software | Affected versions |
|---|---|
phoenix_live_viewHex · osv:Hex:phoenix_live_view |
|
About phoenix_live_view
Vulnerabilities in phoenix_live_view
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-126334Joining a LiveView without `"url"` skips its `live_session` `on_mount` hooksMedium 6.0 20 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-58228