Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via <.link>
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
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. 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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| phoenixframework | phoenix_live_view | 1.2.2 to before 1.2.7 | 1.2.7 | Patch available | CNA |
- phoenix_live_view Vendorphoenixframework Affected 1.2.2 to before 1.2.7 Fixed in 1.2.7 Patch available CNA
CPE names CNA · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:phoenixframework:phoenix_live_view:*:*:*:*:*:*:*:* | — | — | phoenixframework |
- cpe:2.3:a:phoenixframework:phoenix_live_view:*:*:*:*:*:*:*:* Versions — — ·phoenixframework
Remediation
- Fix · CNA phoenix_live_view (phoenixframework) Fixed in 1.2.7
Timeline
- 2026-10-02 Threatist record created from CVE-2026-58228
References
Advisory 1
More phoenixframework vulnerabilities
- TI-2026-40965 Improper check for unusual conditions in phoenixframework phoenix CVSS 4.0MEDIUM 6.3
- TI-2026-40964 Phoenix transports do not limit channel joins per connection, enabling process-exhaustion denial of service CVSS 4.0HIGH 8.7
- TI-2026-46420 Open redirect in Phoenix.LiveView.validate_local_url!/2 via ASCII tab, LF and CR CVSS 4.0LOW 2.1
- TI-2026-25181 Long-poll NDJSON body splitting causes unbounded memory allocation in Phoenix CVSS 4.0HIGH 8.7
- TI-2022-20955 socket/transport.ex in Phoenix before 1.6.14 mishandles check_origin wildcarding. CVSS 3.1HIGH 7.5
- TI-2017-14495 The Phoenix Framework versions 1.0.0 through 1.0.4, 1.1.0 through 1.1.6, 1.2.0, 1.2.2 and… CVSS 3.0MEDIUM 6.1
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences