GHSA-6Q9V-4HQ6-5M67
Vulnerability from github – Published: 2024-05-15 20:14 – Updated: 2024-05-15 20:14Doctrine 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.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "doctrine/orm"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.0.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "doctrine/orm"
},
"ranges": [
{
"events": [
{
"introduced": "1.0.0"
},
{
"fixed": "1.2.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [],
"github_reviewed": true,
"github_reviewed_at": "2024-05-15T20:14:15Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"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.",
"id": "GHSA-6q9v-4hq6-5m67",
"modified": "2024-05-15T20:14:15Z",
"published": "2024-05-15T20:14:15Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Doctrine SQL injection vulnerability"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.