{"id":"CVE-2026-45064","aliases":["CVE-2026-45064","GHSA-h5vq-qfcg-4m6p"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony: HtmlSanitizer URL Attributes Pass Through BiDi Override Characters → Visual href Spoofing","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Description\n\n`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.\n\n### Resolution\n\n`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.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/743a435e948b897ef2b5564ac438d4beb95d2526) for branch 5.4.\n\n### Credits\n\nSymfony would like to thank Himanshu Anand for reporting the issue and Nicolas Grekas for providing the fix.","format":"markdown","source":"ghsa"}],"published":"2026-05-27T20:04:22.000Z","modified":"2026-09-10T03:51:05.868Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":2.3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":2.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-451","CWE-1007"],"affected":[{"ranges":[{"version":">= 6.1.0-BETA1, < 6.4.40","status":"affected"},{"version":">= 7.0.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"symfony","source":"cvelist"},{"ranges":[{"version":">= 6.1.0-BETA1, < 6.4.40","status":"affected"},{"version":">= 7.0.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"html-sanitizer","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/html-sanitizer","purl":"pkg:composer/symfony/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/html-sanitizer","purl":"pkg:composer/symfony/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/html-sanitizer","purl":"pkg:composer/symfony/html-sanitizer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"6.1.0","fixed":"6.4.40"},{"status":"affected","introduced":"7.0.0","fixed":"7.4.12"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.12"}],"vendor":"sensiolabs","product":"symfony","cpe":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-h5vq-qfcg-4m6p","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/743a435e948b897ef2b5564ac438d4beb95d2526","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v6.4.40","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v7.4.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v8.0.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/html-sanitizer/CVE-2026-45064.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45064.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]},{"url":"https://symfony.com/cve-2026-45064","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-21T19:09:18.820Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45064","url":"https://www.cve.org/CVERecord?id=CVE-2026-45064","licence":"CVE Terms of Use","modified":"2026-07-21T19:09:27.830Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h5vq-qfcg-4m6p","url":"https://github.com/advisories/GHSA-h5vq-qfcg-4m6p","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:05.868Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45064","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45064","licence":"Public domain","modified":"2026-07-21T20:17:00.933Z"}],"updatedAt":"2026-11-25T22:59:28.155Z","epss":{"score":0.00293,"percentile":0.23608,"date":"2026-12-01T12:00:22.000Z"}}