# CVE-2021-43608: DBAL 3 SQL Injection Security Vulnerability

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.45%, higher than 84% of CVEs (2026-12-01)
- Published: 2021-11-16T17:25:57.000Z
- Modified: 2026-07-08T06:28:09.549Z
- Also known as: GHSA-r7cj-8hjg-x622
- Weaknesses: CWE-89
- Assigned by: mitre

## Description

Doctrine DBAL 3.x before 3.1.4 allows SQL Injection. The escaping of offset and length inputs to the generation of a LIMIT clause was not probably cast to an integer, allowing SQL injection to take place if application developers passed unescaped user input to the DBAL QueryBuilder or any other API that ultimately uses the AbstractPlatform::modifyLimitQuery API.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- doctrine/dbal (Packagist): from 3.0.0 before 3.1.4
- doctrine-project database_abstraction_layer: from 3.0.0 before 3.1.4

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/doctrine/dbal/commit/9dcfa4cb6c03250b78a84737ba7ceb82f4b7ba4d> (patch, third-party-advisory, web)
- <https://www.doctrine-project.org/2021/11/11/dbal3-vulnerability-fixed.html> (vendor-advisory, web)
- <https://github.com/doctrine/dbal/releases> (release-notes, third-party-advisory, web)
- <https://github.com/doctrine/dbal/security/advisories/GHSA-r7cj-8hjg-x622> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-43608> (advisory)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/doctrine/dbal/CVE-2021-43608.yaml> (web)
- <https://github.com/doctrine/dbal> (web)

## Sources

- CVE List: [CVE-2021-43608](https://www.cve.org/CVERecord?id=CVE-2021-43608), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-r7cj-8hjg-x622](https://github.com/advisories/GHSA-r7cj-8hjg-x622), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-43608](https://nvd.nist.gov/vuln/detail/CVE-2021-43608), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-43608 · Whole record: https://cve.day/CVE-2021-43608.json · Rebuilt by cve.day 2026-11-25T22:24:36.198Z
