# CVE-2026-58228: Scheme validation bypass in Phoenix.LiveView.Utils leads to XSS via <.link>

Status: published. Published: 2026-07-13. Updated: 2026-11-24.

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.

## Remediation

- workaround: Strip leading ASCII control and space bytes (code points 0x00 through 0x20) from any untrusted URL before passing it to <.link href={...}>, or reject such inputs outright. This aligns application-level validation with the WHATWG URL parser used by browsers and prevents the scheme-detection bypass. (source: CNA: EEF)
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: EEF) — https://github.com/phoenixframework/phoenix_live_view/commit/86165533e311469a1b62093fd182d9d874de8106

## Affected products and versions

- phoenixframework / phoenix_live_view (phoenix_live_view): ≥ 1.2.2; < 1.2.7 (affected, semver). Source: CNA: EEF
- phoenixframework / phoenix_live_view (phoenixframework/phoenix_live_view): ≥ 4b63216ae68886db99cf7772af23372d76c40e7e; < 86165533e311469a1b62093fd182d9d874de8106 (affected, git). Source: CNA: EEF

## Severity and prioritization

- CVSS 4.0: 5.1 (medium); 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; source: CNA: EEF

- CISA KEV: No listing in collected sources

- EPSS: 0.47% as of 2026-11-23; percentile 41.86%

- SSVC: exploitation poc; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-79

## Exploit evidence

- exploit: https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cq (ADP: CISA-ADP)

## References

- https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cq (CNA: EEF; vendor-advisory, related)

- https://cna.erlef.org/cves/CVE-2026-58228.html (CNA: EEF; related)

- https://osv.dev/vulnerability/EEF-CVE-2026-58228 (CNA: EEF; related)

- https://github.com/phoenixframework/phoenix_live_view/commit/4b63216ae68886db99cf7772af23372d76c40e7e (CNA: EEF; related)

- https://github.com/phoenixframework/phoenix_live_view/commit/86165533e311469a1b62093fd182d9d874de8106 (CNA: EEF; patch)

- https://github.com/phoenixframework/phoenix_live_view/security/advisories/GHSA-5cgh-g58j-m9cq (ADP: CISA-ADP; exploit)

## Provenance

- CNA: EEF: https://www.cve.org/CVERecord?id=CVE-2026-58228; retrieved 2026-11-24; source updated 2026-11-24

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-58228; retrieved 2026-11-24; source updated Not reported

Revision: 8125a893cb91b8c810d4569767917fa07b4846bb414fbbd45c06fdc5976210bd

Canonical: https://y2.dev/cve/CVE-2026-58228

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.