MediumGHSA-6qh9-h6wf-jgqc
Symfony Vulnerable to SQL Injection in PdoAdapter::doClear() via Unsanitized $prefix
Affected versions
before 5.4.52, 6.0.0 to before 6.4.40, 7.0.0 to before 7.4.12, 8.0.0 to before 8.0.12 - fixed in 5.4.52Details
### Description `Symfony\Component\Cache\Adapter\PdoAdapter` is the PDO-backed cache adapter. Its `clear($prefix)` method (inherited from `AbstractAdapterTrait`) is documented to delete cache items whose key starts with `$prefix`. In the non-versioning code path, the caller-supplied `$prefix` is concatenated into `$namespace = $this->namespace.$prefix` and passed to `PdoAdapter::doClear()`, which builds: ```sql DELETE FROM <table> WHERE <id_col> LIKE '<namespace>%' ``` The value is interpolated directly into the SQL text and executed with `PDO::exec()`: `$namespace` is not bound. A caller
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-45073
- https://github.com/symfony/symfony/security/advisories/GHSA-6qh9-h6wf-jgqc
- https://github.com/symfony/symfony/commit/ec50b799d79ebe24561f29351c1efcb6da95c9b
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/cache/CVE-2026-45073.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45073.yaml
- https://github.com/symfony/symfony
- https://symfony.com/cve-2026-45073
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected