Skip to main content

CVE-2026-45073 — Symfony Vulnerable to SQL Injection in...

MEDIUM

Symfony Vulnerable to SQL Injection in PdoAdapter::doClear() via Unsanitized $prefix

Published May 27, 2026Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.46%). Schedule for your next planned update.

Does your project use an affected symfony/symfony version?

Paste your composer.lock to check it for CVE-2026-45073 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my composer.lock

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.

Advisory Timeline

  • First published May 27, 2026 (184 days ago).
  • Last revised September 10, 2026 — 105 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update symfony/symfony to 7.4.12 or later
composer require "symfony/symfony:^7.4.12"
Composer
Update symfony/symfony to 6.4.40 or later
composer require "symfony/symfony:^6.4.40"
Composer
Update symfony/symfony to 8.0.12 or later
composer require "symfony/symfony:^8.0.12"
Composer
Update symfony/symfony to 5.4.52 or later
composer require "symfony/symfony:^5.4.52"
Composer
Update symfony/cache to 7.4.12 or later
composer require "symfony/cache:^7.4.12"
Composer
Update symfony/cache to 8.0.12 or later
composer require "symfony/cache:^8.0.12"
Composer
Update symfony/cache to 5.4.52 or later
composer require "symfony/cache:^5.4.52"
Composer
Update symfony/cache to 6.4.40 or later
composer require "symfony/cache:^6.4.40"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (8)

Affects 1 ecosystem: Packagist (2).

PackageFixed In
symfony/symfony Packagist · Affected: v7.0.0, v7.0.1, v7.0.10, v7.0.2 (+66 more)7.4.12
symfony/symfony Packagist · Affected: v6.0.0, v6.0.1, v6.0.10, v6.0.11 (+116 more)6.4.40
symfony/symfony Packagist · Affected: v8.0.0, v8.0.1, v8.0.10, v8.0.11 (+8 more)8.0.12
symfony/symfony Packagist · Affected: 2.0.4, 2.0.5, 2.0.6, 2.0.7 (+627 more)5.4.52
symfony/cache Packagist · Affected: v7.0.0, v7.0.10, v7.0.2, v7.0.3 (+53 more)7.4.12
symfony/cache Packagist · Affected: v8.0.0, v8.0.1, v8.0.10, v8.0.3 (+6 more)8.0.12
symfony/cache Packagist · Affected: v3.1.0, v3.1.0-BETA1, v3.1.0-RC1, v3.1.1 (+316 more)5.4.52
symfony/cache Packagist · Affected: v6.0.0, v6.0.1, v6.0.10, v6.0.11 (+87 more)6.4.40

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N/E:U

Frequently Asked Questions

What is CVE-2026-45073?
Symfony Vulnerable to SQL Injection in PdoAdapter::doClear() via Unsanitized $prefix. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 7.1/10).
How do I check if my project is affected by CVE-2026-45073?
CVE-2026-45073 affects symfony/symfony and symfony/cache. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-45073 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.1

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.46%
EPSS percentile: 31.6

This is a below-median EPSS score — only 31.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-6qh9-h6wf-jgqc

Related CVEs

  • CVE-2018-11407
    CRITICAL

    Symfony Authentication Bypass

  • CVE-2019-18889
    CRITICAL

    Symfony Unsafe Cache Serialization Could Enable RCE

  • CVE-2026-109413
    HIGH

    Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process

  • CVE-2025-64500
    HIGH

    Symfony's incorrect parsing of PATH_INFO can lead to limited authorization bypass

  • CVE-2026-45075
    HIGH

    Symfony's HEAD Request Bypasses methods: ['GET'] Filter in #[IsGranted] / #[IsSignatureValid] / #[IsCsrfTokenValid]

  • CVE-2018-11406
    HIGH

    Symfony CSRF Token Fixation

  • CVE-2026-45754
    MEDIUM

    Symfony's Mailjet Mailer Webhook Parser Never Verifies the Configured Secret — Unauthenticated Webhook Event Injection

  • CVE-2026-47767
    MEDIUM

    SymfonyRuntime CVE-2024-50340 Patch Bypass: Web Requests Can Still Set APP_ENV/APP_DEBUG via parse_str/SAPI Argv Mismatch

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my composer.lock