Summary
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:
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 able to influence $prefix can break out of the literal and inject SQL, expanding deletion scope from the intended prefix to arbitrary rows, or otherwise reshape query semantics.
Most applications don't expose clear($prefix) to untrusted input directly, but the contract of the method is to safely accept any prefix string, so the lack of escaping is a defect of the adapter itself.
Resolution
AbstractAdapterTrait::clear() now rejects any $prefix containing characters outside [-+.A-Za-z0-9]: when an invalid prefix is supplied, the method logs a warning and returns false instead of reaching the SQL layer. This blocks quotes, %, null bytes and other characters that would let an attacker break out of the LIKE literal.
The patch for this issue is available here for branch 5.4.
Credits
Symfony would like to thank secsys_codex for reporting the issue and Nicolas Grekas for fixing it.
Impact
Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
symfony/cache to 5.4.52 or later; symfony/cache to 6.4.40 or later; symfony/cache to 7.4.12 or later; symfony/cache to 8.0.12 or later; symfony/symfony to 5.4.52 or later; symfony/symfony to 6.4.40 or later; symfony/symfony to 7.4.12 or later; symfony/symfony to 8.0.12 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-45073? CVE-2026-45073 is a medium-severity SQL injection vulnerability in symfony/cache (composer), affecting versions < 5.4.52. It is fixed in 5.4.52, 6.4.40, 7.4.12, 8.0.12. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
- Which packages are affected by CVE-2026-45073?
symfony/cache(composer) (versions < 5.4.52)symfony/symfony(composer) (versions < 5.4.52)
- Is there a fix for CVE-2026-45073? Yes. CVE-2026-45073 is fixed in 5.4.52, 6.4.40, 7.4.12, 8.0.12. Upgrade to this version or later.
- Is CVE-2026-45073 exploitable, and should I be worried? Whether CVE-2026-45073 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-45073 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-45073?
- Upgrade
symfony/cacheto 5.4.52 or later - Upgrade
symfony/cacheto 6.4.40 or later - Upgrade
symfony/cacheto 7.4.12 or later - Upgrade
symfony/cacheto 8.0.12 or later - Upgrade
symfony/symfonyto 5.4.52 or later - Upgrade
symfony/symfonyto 6.4.40 or later - Upgrade
symfony/symfonyto 7.4.12 or later - Upgrade
symfony/symfonyto 8.0.12 or later
- Upgrade