GHSA-6q9v-4hq6-5m67: Doctrine/orm SQL Injection Vulnerability
CRITICALGHSA-6q9v-4hq6-5m67 is a CRITICAL sql injection vulnerability (General Security Weakness) affecting Doctrine/orm libraries in the Packagist ecosystem. The issue involves doctrine sql injection vulnerability. Remediation is available by upgrading affected packages to version 2.0.3, 1.2.4.
GHSA-6q9v-4hq6-5m67 at a Glance
How to Fix GHSA-6q9v-4hq6-5m67
To remediate this vulnerability, upgrade all affected Doctrine/orm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade doctrine/orm to 2.0.3
Upgrade doctrine/orm to 1.2.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for doctrine/orm
How to Check if You Are Affected
To determine whether your application is affected by GHSA-6q9v-4hq6-5m67, inspect your project dependencies for Doctrine/orm:
inspect dependencies for doctrine/orm
Analyze the terminal output to locate any version of Doctrine/orm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Doctrine/orm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-6q9v-4hq6-5m67 Affected Doctrine/orm Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
doctrine/orm
|
Packagist |
≥ 2.0.0
< 2.0.3
|
2.0.3
|
|
doctrine/orm
|
Packagist |
≥ 1.0.0
< 1.2.4
|
1.2.4
|
References
Frequently Asked Questions
What is GHSA-6q9v-4hq6-5m67?
Which Doctrine/orm versions are affected?
What version fixes GHSA-6q9v-4hq6-5m67?
Is doctrine/orm affected?
What CWE is associated with GHSA-6q9v-4hq6-5m67?
How can I check Packagist dependencies for GHSA-6q9v-4hq6-5m67?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6q9v-4hq6-5m67",
"modified" : "2024-05-15T20:14:15Z",
"published" : "2024-05-15T20:14:15Z",
"aliases" : [ ],
"summary" : "Doctrine SQL injection vulnerability",
"details" : "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.\n\nAffected versions are:\n- 1.2.3 and earlier for PostgreSQL and DB2 Dialects\n- 2.0.2 and earlier\n\nThe 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.\n\nThe 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.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "doctrine/orm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "doctrine/orm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.2.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/doctrine/orm/2011-09-25.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/doctrine/orm"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20120315064147/https://www.doctrine-project.org/blog/doctrine-security-fix.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-15T20:14:15Z",
"nvd_published_at" : null
}
}