CVE-2026-45064: Symfony: HtmlSanitizer URL Attributes Pass Through BiDi Override Characters → Visual href Spoofing

Published May 27, 2026
·
Updated

Description

Symfony\Component\HtmlSanitizer\TextSanitizer\UrlSanitizer::parse() (used by UrlSanitizer::sanitize() and therefore by every HtmlSanitizer config that allows links or media) accepts URLs that contain Unicode explicit-direction BiDi formatting characters: U+202A–U+202E (LRE / RLE / PDF / LRO / RLO) and U+2066–U+2069 (LRI / RLI / FSI / PDI). These characters are passed through unchanged into the href / src attributes produced by HtmlSanitizer. When the resulting HTML is rendered in a browser, the override characters reverse or alter the visual ordering of the URL text, so the displayed link can differ arbitrarily from the actual destination: a classic visual-spoofing / phishing primitive against viewers of sanitized content.

Resolution

UrlSanitizer::parse() now rejects URLs containing the explicit-direction BiDi formatting code points (U+202A–U+202E, U+2066–U+2069) before invoking the underlying URL parser. As an unrelated companion fix in the same patch, spaces inside path/query/fragment are now percent-encoded rather than rejected outright, while spaces in the scheme/authority remain rejected by the post-encoding whitespace check.

The patch for this issue is available here for branch 5.4.

Credits

Symfony would like to thank Himanshu Anand for reporting the issue and Nicolas Grekas for providing the fix.

Other sources

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 6.1.0-BETA1 until 6.4.40, 7.4.12, and 8.0.12, UrlSanitizer::parse() passes Unicode explicit-direction BiDi formatting characters through into sanitized href and src attributes, allowing sanitized content to display a link destination that visually differs from the actual destination and enabling phishing-style visual spoofing. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.

MITRE

Affected Software

9 affected componentsFixes available
composer/symfony/symfony>=8.0.0<8.0.12
8.0.12
composer/symfony/symfony>=7.0.0<7.4.12
7.4.12
composer/symfony/symfony>=6.1.0<6.4.40
6.4.40
composer/symfony/html-sanitizer>=8.0.0<8.0.12
8.0.12
composer/symfony/html-sanitizer>=7.0.0<7.4.12
7.4.12
composer/symfony/html-sanitizer>=6.1.0<6.4.40
6.4.40
SensioLabs Symfony>=6.1.0<6.4.40
SensioLabs Symfony>=7.0.0<7.4.12
SensioLabs Symfony>=8.0.0<8.0.12

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 8.0.12
  2. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 7.4.12
  3. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 6.4.40
  4. Upgrade

    Upgrade composer/symfony/html-sanitizer to a version that resolves this vulnerability.

    Fixed in 8.0.12
  5. Upgrade

    Upgrade composer/symfony/html-sanitizer to a version that resolves this vulnerability.

    Fixed in 7.4.12
  6. Upgrade

    Upgrade composer/symfony/html-sanitizer to a version that resolves this vulnerability.

    Fixed in 6.4.40
  7. Upgrade

    Upgrade Symfony HtmlSanitizer / UrlSanitizer to a version that resolves this vulnerability.

    Fixed in 6.4.40
  8. Upgrade

    Upgrade Symfony HtmlSanitizer / UrlSanitizer to a version that resolves this vulnerability.

    Fixed in 7.4.12
  9. Upgrade

    Upgrade Symfony HtmlSanitizer / UrlSanitizer to a version that resolves this vulnerability.

    Fixed in 8.0.12
  10. Compensating control

    If you cannot upgrade immediately, prevent sanitized link/media output from being rendered with attacker-supplied URLs containing Unicode explicit-direction BiDi formatting code points U+202A–U+202E (LRE/RLE/PDF/LRO/RLO) and U+2066–U+2069 (LRI/RLI/FSI/PDI); reject or strip these characters before UrlSanitizer::sanitize() would parse the URL so that HtmlSanitizer cannot pass BiDi override characters through into href/src attributes.

Event History

May 27, 2026
Advisory Published
via GitHub·08:04 PM
Data Sourced
via GitHub·08:04 PM
DescriptionWeaknessAffected Software
Jul 14, 2026
CVE Published
via MITRE·06:35 PM
Data Sourced
via MITRE·06:35 PM
DescriptionWeakness
Data Sourced
via NVD·07:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-45064?

The severity level of CVE-2026-45064 is rated at 37, indicating a moderate risk.

2

How do I fix CVE-2026-45064?

To mitigate CVE-2026-45064, update to the latest version of Symfony where the vulnerability has been patched.

3

What types of characters are exploited in CVE-2026-45064?

CVE-2026-45064 is exploited through Unicode explicit-direction BiDi formatting characters: U+202A to U+202E.

4

Which Symfony components are affected by CVE-2026-45064?

CVE-2026-45064 affects the Symfony component users of the HtmlSanitizer, particularly the UrlSanitizer class.

5

What impact does CVE-2026-45064 have on web applications?

CVE-2026-45064 can allow for potential injection attacks through improperly sanitized URLs in web applications.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203