Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘 Packagist
Not in CISA KEV

Symfony Vulnerable to SQL Injection in PdoAdapter::doClear() via Unsanitized $prefixGHSA-6qh9-h6wf-jgqc

Fix: symfony/symfony@ec50b79

GHSA-6qh9-h6wf-jgqc is a SQL Injection vulnerability in symfony/cache. A fix is available for symfony/cache — see the affected versions and patch details below.

Also known asCVE-2026-45073
Published
Updated
Affected
8 pkgs
Patched
8 / 8
Exploits
None indexed
Exploitation data as of Oct 7, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-6qh9-h6wf-jgqc.

EPSS Exploitation Probability

via FIRST.org ↗
0.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs38th percentile — riskier than 38% of all scored CVEsHighest risk
0.00%0.32%0.64%0.96%0.4%0.5%0.5%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

8 pkgs affected
🐘symfony/cache🐘symfony/cache🐘symfony/cache🐘symfony/cache🐘symfony/symfony🐘symfony/symfony🐘symfony/symfony🐘symfony/symfony

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

8 total 8 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistsymfony/cacheall versions5.4.52composer require symfony/cache:^5.4.52
🐘Packagistsymfony/cache≥ 6.0.0&&< 6.4.406.4.40composer require symfony/cache:^6.4.40
🐘Packagistsymfony/cache≥ 7.0.0&&< 7.4.127.4.12composer require symfony/cache:^7.4.12
🐘Packagistsymfony/cache≥ 8.0.0&&< 8.0.128.0.12composer require symfony/cache:^8.0.12
🐘Packagistsymfony/symfonyall versions5.4.52composer require symfony/symfony:^5.4.52
🐘Packagistsymfony/symfony≥ 6.0.0&&< 6.4.406.4.40composer require symfony/symfony:^6.4.40

Affected Products

1 product · 4 configurations
Application
symfonysensiolabs
≥ 8.0.0 && < 8.0.12
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for symfony/cache, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update symfony/cache to 5.4.52 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-6qh9-h6wf-jgqc is resolved across your whole dependency graph.

  3. Workarounds

    Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.

Frequently Asked Questions

### 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
O3 Security · Impact-Aware SCA

Is GHSA-6qh9-h6wf-jgqc in your dependencies?

Find it across Packagist, including transitive dependencies.

Symfony Vulnerable to SQL Injection in PdoAdapter::doCl…