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.

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

symfony/cache (< 5.4.52) symfony/cache (>= 6.0.0, < 6.4.40) symfony/cache (>= 7.0.0, < 7.4.12) symfony/cache (>= 8.0.0, < 8.0.12) symfony/symfony (< 5.4.52) symfony/symfony (>= 6.0.0, < 6.4.40) symfony/symfony (>= 7.0.0, < 7.4.12) symfony/symfony (>= 8.0.0, < 8.0.12)

Security releases

symfony/cache → 5.4.52 (composer) symfony/cache → 6.4.40 (composer) symfony/cache → 7.4.12 (composer) symfony/cache → 8.0.12 (composer) symfony/symfony → 5.4.52 (composer) symfony/symfony → 6.4.40 (composer) symfony/symfony → 7.4.12 (composer) symfony/symfony → 8.0.12 (composer)

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.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

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

  1. 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.
  2. Which packages are affected by CVE-2026-45073?
    • symfony/cache (composer) (versions < 5.4.52)
    • symfony/symfony (composer) (versions < 5.4.52)
  3. 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.
  4. 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
  5. 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.
  6. How do I fix CVE-2026-45073?
    • Upgrade symfony/cache to 5.4.52 or later
    • Upgrade symfony/cache to 6.4.40 or later
    • Upgrade symfony/cache to 7.4.12 or later
    • Upgrade symfony/cache to 8.0.12 or later
    • Upgrade symfony/symfony to 5.4.52 or later
    • Upgrade symfony/symfony to 6.4.40 or later
    • Upgrade symfony/symfony to 7.4.12 or later
    • Upgrade symfony/symfony to 8.0.12 or later

Other vulnerabilities in symfony/cache

Stop the waste.
Protect your environment with Kodem.