{"id":"CVE-2026-45073","aliases":["CVE-2026-45073","GHSA-6qh9-h6wf-jgqc"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony: SQL Injection in PdoAdapter::doClear() via Unsanitized $prefix","summary":"Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, PdoAdapter::doClear() builds a DELETE statement using a namespace derived from the caller-supplied $prefix without binding or escaping it, allowing a caller able to influence $prefix to break out of the LIKE literal and alter query semantics or deletion scope. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, PdoAdapter::doClear() builds a DELETE statement using a namespace derived from the caller-supplied $prefix without binding or escaping it, allowing a caller able to influence $prefix to break out of the LIKE literal and alter query semantics or deletion scope. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.","source":"cvelist"},{"lang":"en","text":"### Description\n\n`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`.\n\nIn the non-versioning code path, the caller-supplied `$prefix` is concatenated into `$namespace = $this->namespace.$prefix` and passed to `PdoAdapter::doClear()`, which builds:\n\n```sql\nDELETE FROM <table> WHERE <id_col> LIKE '<namespace>%'\n```\n\nThe 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.\n\nMost 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.\n\n### Resolution\n\n`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.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/ec50b799d79ebe24561f29351c1efcb6da95c9b1) for branch 5.4.\n\n### Credits\nSymfony would like to thank secsys_codex for reporting the issue and Nicolas Grekas for fixing it.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Symfony es un framework PHP para aplicaciones web y de consola y un conjunto de componentes PHP reutilizables. Antes de las versiones 5.4.52, 6.4.40, 7.4.12 y 8.0.12, PdoAdapter::doClear() construye una sentencia DELETE utilizando un espacio de nombres derivado del $prefix proporcionado por el llamador sin vincularlo ni escaparlo, permitiendo que un llamador capaz de influir en $prefix se salga del literal LIKE y altere la semántica de la consulta o el alcance de la eliminación. Este problema se ha solucionado en las versiones 5.4.52, 6.4.40, 7.4.12 y 8.0.12.","source":"nvd"}],"published":"2026-05-27T21:11:22.000Z","modified":"2026-10-24T21:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 5.4.52","status":"affected"},{"version":">= 6.0.0-BETA1, < 6.4.40","status":"affected"},{"version":">= 7.0.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"symfony","source":"cvelist"},{"ranges":[{"version":"< 5.4.52","status":"affected"},{"version":">= 6.0.0-BETA1, < 6.4.40","status":"affected"},{"version":">= 7.0.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"cache","product":"symfony","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.52"}],"ecosystem":"Packagist","package":"symfony/cache","purl":"pkg:composer/symfony/cache","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/cache","purl":"pkg:composer/symfony/cache","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/cache","purl":"pkg:composer/symfony/cache","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/cache","purl":"pkg:composer/symfony/cache","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.52"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.40"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.4.52"},{"status":"affected","introduced":"6.0.0","fixed":"6.4.40"},{"status":"affected","introduced":"7.0.0","fixed":"7.4.12"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.12"}],"vendor":"sensiolabs","product":"symfony","cpe":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-6qh9-h6wf-jgqc","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/ec50b799d79ebe24561f29351c1efcb6da95c9b1","tags":["patch","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v5.4.52","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v6.4.40","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v7.4.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v8.0.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/commit/ec50b799d79ebe24561f29351c1efcb6da95c9b","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/cache/CVE-2026-45073.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45073.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]},{"url":"https://symfony.com/cve-2026-45073","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-14T19:14:35.344Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45073","url":"https://www.cve.org/CVERecord?id=CVE-2026-45073","licence":"CVE Terms of Use","modified":"2026-07-14T19:14:47.342Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6qh9-h6wf-jgqc","url":"https://github.com/advisories/GHSA-6qh9-h6wf-jgqc","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:46.051Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45073","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45073","licence":"Public domain","modified":"2026-10-24T21:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:28.157Z","epss":{"score":0.0041,"percentile":0.3733,"date":"2026-12-01T12:00:22.000Z"}}