CVE-2011-1522 in Doctrineinfo

Summary

by MITRE

Multiple SQL injection vulnerabilities in the Doctrine\DBAL\Platforms\AbstractPlatform::modifyLimitQuery function in Doctrine 1.x before 1.2.4 and 2.x before 2.0.3 allow remote attackers to execute arbitrary SQL commands via the (1) limit or (2) offset field.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/05/2021

The vulnerability identified as CVE-2011-1522 represents a critical SQL injection flaw affecting the Doctrine PHP framework version 1.x prior to 1.2.4 and 2.x prior to 2.0.3. This vulnerability specifically targets the Doctrine\DBAL\Platforms\AbstractPlatform::modifyLimitQuery function which is responsible for constructing SQL queries when limit and offset parameters are used in database operations. The flaw arises from inadequate input sanitization and parameter handling within the database abstraction layer, creating a pathway for malicious actors to inject arbitrary SQL commands into the system.

The technical implementation of this vulnerability stems from the improper handling of user-supplied limit and offset values within the modifyLimitQuery method. When developers use Doctrine's query building capabilities with dynamic limit and offset parameters, the framework fails to properly escape or validate these inputs before incorporating them into SQL statements. This creates an environment where attackers can manipulate the query construction process by injecting malicious SQL fragments through the limit or offset parameters, effectively bypassing normal security controls and gaining unauthorized access to database operations.

From an operational impact perspective, this vulnerability exposes applications using affected Doctrine versions to significant risks including unauthorized data access, data modification, or complete database compromise. The vulnerability is particularly dangerous because it can be exploited remotely without requiring authentication, making it a prime target for automated attacks. Attackers can leverage this flaw to extract sensitive information from databases, modify or delete critical data, and potentially escalate privileges within the database environment. The attack surface is broad as any application utilizing Doctrine's database abstraction layer with dynamic limit or offset parameters becomes vulnerable.

The vulnerability aligns with CWE-89, which categorizes SQL injection flaws as weaknesses in software that allows attackers to manipulate database queries through untrusted input. Additionally, this vulnerability maps to ATT&CK technique T1071.004, which covers application layer protocol manipulation, specifically targeting database communication protocols. Organizations using affected Doctrine versions should immediately implement mitigations including updating to patched versions, implementing proper input validation, and applying web application firewalls to monitor for suspicious query patterns. The recommended remediation strategy involves upgrading to Doctrine 1.2.4 or 2.0.3 respectively, while also implementing parameterized queries and input sanitization measures to prevent similar vulnerabilities in other components of the application stack.

Reservation

03/28/2011

Disclosure

05/03/2011

Moderation

accepted

Entry

VDB-57301

CPE

ready

EPSS

0.00605

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!