Skip to content

Zendframework1 potential SQL injection vector using null byte for PDO (MsSql, SQLite)

Critical severity GitHub Reviewed Published Jun 7, 2024 to the GitHub Advisory Database • Updated Jun 7, 2024

Package

composer zendframework/zendframework1 (Composer)

Affected versions

>= 1.12.0, < 1.12.16

Patched versions

1.12.16

Description

The PDO adapters of Zend Framework 1 do not filter null bytes values in SQL statements. A PDO adapter can treat null bytes in a query as a string terminator, allowing an attacker to add arbitrary SQL following a null byte, and thus create a SQL injection.

We tested and verified the null byte injection using pdo_dblib (FreeTDS) on a Linux environment to access a remote Microsoft SQL Server, and also tested against and noted the vector against pdo_sqlite.

References

Published to the GitHub Advisory Database Jun 7, 2024
Reviewed Jun 7, 2024
Last updated Jun 7, 2024

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-v42g-7q2x-cw32

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.