CVE-2026-58228: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in phoenixframework phoenix_live_view
A cross-site scripting (XSS) vulnerability exists in phoenixframework phoenix_live_view versions from 1.2.2 before 1.2.7. The issue arises because URL scheme validation incorrectly treats inputs starting with ASCII control characters or spaces as safe relative paths. This allows an attacker to craft URLs with leading spaces that bypass validation and execute JavaScript in a victim's browser when clicked. Applications rendering user-supplied URLs via <.link href={...}> are affected.
AI Analysis
Technical Summary
The vulnerability in phoenix_live_view stems from improper neutralization of input during web page generation, specifically in the Phoenix.LiveView.Utils.valid_destination!/2 and valid_live_navigation_destination!/2 functions. These rely on an internal uri_scheme/1 helper that only detects a URL scheme if the first byte is an ASCII letter. Inputs beginning with ASCII control characters or spaces bypass this check, returning nil and causing the URL to be treated as a safe relative path. Since browsers strip leading control and space characters before parsing URLs, an input like " javascript:alert(1)" is interpreted as a javascript: URL, enabling execution of attacker-controlled scripts in the victim's session. This affects phoenix_live_view versions from 1.2.2 up to but not including 1.2.7.
Potential Impact
An attacker can bypass URL scheme validation to inject and execute arbitrary JavaScript in the context of a victim's browser session. This can lead to cross-site scripting attacks, potentially allowing session hijacking, defacement, or other malicious actions within the affected application. The impact is limited to applications that render user-supplied URLs via <.link href={...}> and do not implement additional validation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid rendering user-supplied URLs directly in <.link href={...}> without strict validation or sanitization that accounts for leading control and space characters. Consider implementing custom URL validation that normalizes inputs before scheme checks to prevent bypass.
CVE-2026-58228: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in phoenixframework phoenix_live_view
Description
A cross-site scripting (XSS) vulnerability exists in phoenixframework phoenix_live_view versions from 1.2.2 before 1.2.7. The issue arises because URL scheme validation incorrectly treats inputs starting with ASCII control characters or spaces as safe relative paths. This allows an attacker to craft URLs with leading spaces that bypass validation and execute JavaScript in a victim's browser when clicked. Applications rendering user-supplied URLs via <.link href={...}> are affected.
CVSS v4.0
Score 5.1medium
Affected software
pkg:github/phoenixframework/phoenix_live_viewcpe:2.3:a:phoenixframework:phoenix_live_view:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in phoenix_live_view stems from improper neutralization of input during web page generation, specifically in the Phoenix.LiveView.Utils.valid_destination!/2 and valid_live_navigation_destination!/2 functions. These rely on an internal uri_scheme/1 helper that only detects a URL scheme if the first byte is an ASCII letter. Inputs beginning with ASCII control characters or spaces bypass this check, returning nil and causing the URL to be treated as a safe relative path. Since browsers strip leading control and space characters before parsing URLs, an input like " javascript:alert(1)" is interpreted as a javascript: URL, enabling execution of attacker-controlled scripts in the victim's session. This affects phoenix_live_view versions from 1.2.2 up to but not including 1.2.7.
Potential Impact
An attacker can bypass URL scheme validation to inject and execute arbitrary JavaScript in the context of a victim's browser session. This can lead to cross-site scripting attacks, potentially allowing session hijacking, defacement, or other malicious actions within the affected application. The impact is limited to applications that render user-supplied URLs via <.link href={...}> and do not implement additional validation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid rendering user-supplied URLs directly in <.link href={...}> without strict validation or sanitization that accounts for leading control and space characters. Consider implementing custom URL validation that normalizes inputs before scheme checks to prevent bypass.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-06-29T18:54:08.633Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a552f7368715ace43a5ece8
Added to database: 07/13/2026, 18:33:23 UTC
Last enriched: 07/20/2026, 19:24:57 UTC
Last updated: 08/26/2026, 13:39:29 UTC
Views: 104
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.