CVE-2026-58228: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in phoenixframework phoenix_live_view
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.
AI Analysis
Technical Summary
The vulnerability in phoenix_live_view stems from the Phoenix.LiveView.Utils.valid_destination!/2 and valid_live_navigation_destination!/2 functions relying on an internal uri_scheme/1 helper that only detects a URL scheme if the first byte is an ASCII letter. Inputs starting with ASCII control characters or spaces do not trigger scheme detection and are treated as safe relative paths. However, browsers strip these leading characters before parsing URLs, allowing inputs like " javascript:alert(1)" to be interpreted as JavaScript URLs. When such URLs are rendered in <.link href={...}>, they can execute arbitrary JavaScript in the victim's browser 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 JavaScript URLs that execute in the context of a victim's browser session. This cross-site scripting vulnerability can lead to script execution, potentially enabling session hijacking, data theft, or other malicious actions within the affected application. The impact is limited to scenarios where user-supplied URLs are rendered via <.link href={...}> without additional sanitization.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, applications should avoid rendering user-supplied URLs directly in <.link href={...}> or implement additional sanitization to strip leading control characters and spaces from URLs before rendering. Monitoring vendor communications for an official patch or update is recommended.
CVE-2026-58228: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in phoenixframework phoenix_live_view
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. 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.
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 the Phoenix.LiveView.Utils.valid_destination!/2 and valid_live_navigation_destination!/2 functions relying on an internal uri_scheme/1 helper that only detects a URL scheme if the first byte is an ASCII letter. Inputs starting with ASCII control characters or spaces do not trigger scheme detection and are treated as safe relative paths. However, browsers strip these leading characters before parsing URLs, allowing inputs like " javascript:alert(1)" to be interpreted as JavaScript URLs. When such URLs are rendered in <.link href={...}>, they can execute arbitrary JavaScript in the victim's browser 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 JavaScript URLs that execute in the context of a victim's browser session. This cross-site scripting vulnerability can lead to script execution, potentially enabling session hijacking, data theft, or other malicious actions within the affected application. The impact is limited to scenarios where user-supplied URLs are rendered via <.link href={...}> without additional sanitization.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, applications should avoid rendering user-supplied URLs directly in <.link href={...}> or implement additional sanitization to strip leading control characters and spaces from URLs before rendering. Monitoring vendor communications for an official patch or update is recommended.
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/13/2026, 18:48:00 UTC
Last updated: 07/14/2026, 02:15:31 UTC
Views: 12
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.