# CVE-2026-45064: Symfony HtmlSanitizer visual spoofing via BiDi override characters

Source: https://junglewise.ai/threats/cve-2026-45064-symfony-htmlsanitizer-visual-spoofing-via-bidi-override  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-14. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2026-45064 · Severity: medium · CVSS 4 · Published 2026-07-14

Symfony is a popular PHP framework used to build web applications. A vulnerability in its HTML sanitization component allows attackers to create links that look like they lead to a safe website but actually direct users to a different, potentially malicious destination. This could be used in phishing attacks to trick users into visiting fraudulent sites or downloading harmful content.

Technologies: [symfony/html-sanitizer (Packagist)](https://junglewise.ai/threats/technologies/symfony-html-sanitizer), [symfony/symfony (Packagist)](https://junglewise.ai/threats/technologies/symfony-symfony), [Symfony HtmlSanitizer](https://junglewise.ai/threats/technologies/htmlsanitizer). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist), [Symfony](https://junglewise.ai/threats/vendors/symfony).

## Quick answers

**Is CVE-2026-45064 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45064 being exploited in the wild.

**How severe is CVE-2026-45064?** Medium severity, with a CVSS score of 4, published 14 July 2026.

**Which products and versions are affected?** symfony/html-sanitizer (Packagist) ECOSYSTEM:introduced=6.1.0,fixed=6.4.40; symfony/symfony (Packagist) ECOSYSTEM:introduced=6.1.0,fixed=6.4.40; Symfony HtmlSanitizer >= 6.1.0-BETA1, < 6.4.40, >= 6.1.0, < 6.4.40; >= 7.0.0, < 7.4.12; >= 8.0.0, < 8.0.12.

**Is there a fix for CVE-2026-45064?** Yes. symfony/html-sanitizer (Packagist): upgrade to 6.4.40 or later; symfony/symfony (Packagist): upgrade to 6.4.40 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45064 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-45064?** Check whether you run symfony/html-sanitizer (Packagist), symfony/symfony (Packagist) or Symfony HtmlSanitizer at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- symfony/html-sanitizer (Packagist): upgrade to 6.4.40 or later

  ```sh
  composer require symfony/html-sanitizer:^6.4.40
  ```

- symfony/symfony (Packagist): upgrade to 6.4.40 or later

  ```sh
  composer require symfony/symfony:^6.4.40
  ```


## Technical details

A vulnerability exists in the Symfony HtmlSanitizer component where the UrlSanitizer::parse() method fails to filter Unicode explicit-direction BiDi (Bidirectional) formatting characters. These characters are passed through into sanitized 'href' and 'src' attributes. An attacker can exploit this by crafting URLs that use BiDi overrides to visually misrepresent the link destination to a user, facilitating phishing attacks. The vulnerability affects versions starting from 6.1.0-BETA1 and is fixed in versions 6.4.40, 7.4.12, and 8.0.12. The fix involves rejecting BiDi override characters and ensuring proper percent-encoding of spaces in URLs.

## Affected products

- symfony symfony >= 6.1.0-BETA1, < 6.4.40
- symfony symfony >= 7.0.0-BETA1, < 7.4.12
- symfony symfony >= 8.0.0-BETA1, < 8.0.12
- symfony html-sanitizer >= 6.1.0-BETA1, < 6.4.40
- symfony html-sanitizer >= 7.0.0-BETA1, < 7.4.12
- symfony html-sanitizer >= 8.0.0-BETA1, < 8.0.12

## Identifiers

- CVE-2026-45064
- GHSA-h5vq-qfcg-4m6p

## Timeline

- 2026-07-14: advisory
- 2026-07-14: disclosed
- 2026-05-20: patched

## References

- [https://github.com/symfony/symfony/commit/743a435e948b897ef2b5564ac438d4beb95d2526](https://github.com/symfony/symfony/commit/743a435e948b897ef2b5564ac438d4beb95d2526)
- [https://github.com/symfony/symfony/releases/tag/v6.4.40](https://github.com/symfony/symfony/releases/tag/v6.4.40)
- [https://github.com/symfony/symfony/releases/tag/v7.4.12](https://github.com/symfony/symfony/releases/tag/v7.4.12)
- [https://github.com/symfony/symfony/releases/tag/v8.0.12](https://github.com/symfony/symfony/releases/tag/v8.0.12)
- [https://github.com/symfony/symfony/security/advisories/GHSA-h5vq-qfcg-4m6p](https://github.com/symfony/symfony/security/advisories/GHSA-h5vq-qfcg-4m6p)

## Related threats

- [Symfony HtmlSanitizer media URL policy bypass in srcset attributes](https://junglewise.ai/threats/cve-2026-121949-the-symfony-htmlsanitizer-component-does-not-apply-the-media-url)
- [Symfony HtmlSanitizer UrlSanitizer host allowlist bypass](https://junglewise.ai/threats/cve-2026-118517-the-symfony-htmlsanitizer-component-urlsanitizer-parses-urls)
- [Symfony HtmlSanitizer meta refresh URL sanitization bypass](https://junglewise.ai/threats/cve-2026-121373-the-symfony-htmlsanitizer-component)
- [Symfony YAML stack exhaustion in inline lexer](https://junglewise.ai/threats/cve-2026-109413-in-symfony-yaml-prior-to-versions-5-4-54-6-4-45-7-4-18-and-8-1-6)
- [Symfony HTTP Foundation ReDoS in HeaderUtils::split()](https://junglewise.ai/threats/cve-2026-108082-symfony-is-a-php-framework-for-web-and-console-applications-and)
