Summary
Doctrine SQL injection vulnerability
Doctrine is prone to SQL injection vulnerability. Users of Doctrine 1.2 and 2 should update to the newly released versions of both libraries immediately. Both versions only include the security fix and no other changes to their previous versions 1.2.3 and 2.0.2.
Affected versions are:
- 1.2.3 and earlier for PostgreSQL and DB2 Dialects
- 2.0.2 and earlier
The security issue was found to affect the Doctrine\DBAL\Platforms\AbstractPlatform::modifyLimitQuery() function which does not cast input values for limit and offset to integer and allows malicious SQL to be executed if these parameters are passed into Doctrine 2 directly from request variables without previous cast to integer. Functionality building on top using limit queries in the ORM such as Doctrine\ORM\Query::setFirstResult() and Doctrine\ORM\Query::setMaxResults() are also affected by this security issue.
The fix for this security issue breaks backwards compatibility for developers that extend the Doctrine\DBAL\Platforms\AbstractPlatform::modifyLimitQuery() method, because it is now marked as final. Please overwrite the Doctrine\DBAL\Platforms\AbstractPlatform::doModifyLimitQuery() method instead.
Impact
Affected versions
Security releases
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.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
doctrine/orm to 2.0.3 or later; doctrine/orm to 1.2.4 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-6Q9V-4HQ6-5M67? GHSA-6Q9V-4HQ6-5M67 is a critical-severity security vulnerability in doctrine/orm (composer), affecting versions >= 2.0.0, < 2.0.3. It is fixed in 2.0.3, 1.2.4.
- Which versions of doctrine/orm are affected by GHSA-6Q9V-4HQ6-5M67? doctrine/orm (composer) versions >= 2.0.0, < 2.0.3 is affected.
- Is there a fix for GHSA-6Q9V-4HQ6-5M67? Yes. GHSA-6Q9V-4HQ6-5M67 is fixed in 2.0.3, 1.2.4. Upgrade to this version or later.
- Is GHSA-6Q9V-4HQ6-5M67 exploitable, and should I be worried? Whether GHSA-6Q9V-4HQ6-5M67 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
- What actually determines whether GHSA-6Q9V-4HQ6-5M67 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.
- How do I fix GHSA-6Q9V-4HQ6-5M67?
- Upgrade
doctrine/ormto 2.0.3 or later - Upgrade
doctrine/ormto 1.2.4 or later
- Upgrade