CVE-2026-45753·PHP vulnerability
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, UrlAttributeSanitizer::getSupportedAttributes() omits URL-valued attributes including action, formaction, poster, and cite, so configurations that admit those attributes can leave javascript: URIs unsanitized and enable XSS when the resulting HTML is rendered or a victim submits a form or clicks a button. This issue is fixed in versions 6.4.40, 7.4.12, and 8.0.12.
- Severity
- medium
- Software
- PHP
- Fixed in
- 8.0.12
- Published
- 2026-07-14
Affected versions
From: 8.0.0
Until: 8.0.12
Fixed in: 8.0.12
How to fix this CVE
Update Symfony to version 8.0.12 or later to patch the UrlAttributeSanitizer vulnerability that fails to sanitize javascript: URIs in HTML form attributes. This vulnerability allows attackers to inject malicious JavaScript through form action, button formaction, video poster, and blockquote cite attributes when user input is processed without proper URL validation. Ensure your PHP environment runs Symfony 8.0.12 or above, and test your application's HTML sanitization behavior after patching.
sudo dnf update php php-symfonyDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST|GET.*action=(['"])?javascript:|formaction=(['"])?javascript:|poster=(['"])?javascript:|cite=(['"])?javascript:WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement ModSecurity or similar WAF rules to block HTTP requests containing javascript: URI scheme in form action, formaction, poster, or cite HTML attributes. Example rule: SecRule ARGS|REQUEST_BODY '@rx (?:action|formaction|poster|cite)\s*=\s*["\']?javascript:' 'id:1000,phase:2,deny,status:403,msg:Potential XSS via URL attribute'How to check if you are affected
- Check installed Symfony version: php -r 'echo Symfony\Component\HttpKernel\Kernel::VERSION;' or grep -r "VERSION" vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php
- Verify UrlAttributeSanitizer class location: find /path/to/app -name 'UrlAttributeSanitizer.php' -exec grep -l 'getSupportedAttributes' {} \;
- Search application logs for XSS-related errors or warnings: grep -i 'javascript\|xss\|sanitiz' /var/log/php-errors.log /var/log/apache2/error.log /var/log/nginx/error.log
- Confirm patched version is running: php -v and verify Symfony version is 8.0.12 or higher by examining composer.lock or running composer show symfony/symfony
FAQ
What is CVE-2026-45753?
This vulnerability affects Symfony's UrlAttributeSanitizer class, which fails to properly filter URL-type HTML attributes (action, formaction, poster, cite) for malicious javascript: URIs. An attacker can inject XSS payloads through these attributes that execute when the page renders or a form is submitted.
Is CVE-2026-45753 being actively exploited?
No, this vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits have been disclosed, though it remains a medium-severity risk requiring patching.
What versions of PHP are affected by CVE-2026-45753?
This vulnerability affects Symfony versions 8.0.0 through 8.0.11. It was also present in Symfony 6.1.0-BETA1 through 6.4.39 and 7.0.0 through 7.4.11. Update to Symfony 8.0.12 or later to resolve the issue.
How do I check if my server is vulnerable to CVE-2026-45753?
Run 'php -r "require 'vendor/autoload.php'; echo Symfony\Component\HttpKernel\Kernel::VERSION;"' to check your Symfony version. If it reports 8.0.0 through 8.0.11, your system is vulnerable.
Does Defensia detect CVE-2026-45753?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If PHP with Symfony is installed on a monitored server, CVE-2026-45753 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
- https://github.com/symfony/symfony/commit/487728e7e180a674a6d4c01bd0cb56161cc441b7
- 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/v8.0.12
- https://github.com/symfony/symfony/security/advisories/GHSA-hhg7-c65m-h7ff
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-45753. Free for 1 server.
Get started free