Buffer overflow in PHP - CVE-2007-1887

 

Buffer overflow in PHP - CVE-2007-1887

Published: July 21, 2022 / Updated: June 8, 2025


Vulnerability identifier: #VU110411
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2007-1887
CWE-ID: CWE-120
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to read and manipulate data.

Buffer overflow in the sqlite_decode_binary function in the bundled sqlite library in PHP 4 before 4.4.5 and PHP 5 before 5.2.1 allows context-dependent attackers to execute arbitrary code via an empty value of the in parameter, as demonstrated by calling the sqlite_udf_decode_binary function with a 0x01 character.


Affected software

PHP
Debian Linux
Ubuntu
php5-cgi (Ubuntu package)
php5-cli (Ubuntu package)
php5-sqlite (Ubuntu package)
libapache2-mod-php5 (Ubuntu package)
php5 (Debian package)

How to mitigate CVE-2007-1887

Install update from vendor's website.

PHP - update to 5.2.3
php5-cgi (Ubuntu package) - addressed in versions 5.1.2-1ubuntu3.7, 5.1.6-1ubuntu2.4, 5.2.1-0ubuntu1.1
php5-cli (Ubuntu package) - addressed in versions 5.1.2-1ubuntu3.7, 5.1.6-1ubuntu2.4, 5.2.1-0ubuntu1.1
php5-sqlite (Ubuntu package) - addressed in versions 5.1.2-1ubuntu3.7, 5.1.6-1ubuntu2.4, 5.2.1-0ubuntu1.1
libapache2-mod-php5 (Ubuntu package) - addressed in versions 5.1.2-1ubuntu3.7, 5.1.6-1ubuntu2.4, 5.2.1-0ubuntu1.1
php5 (Debian package) - update to 5.2.0-8+etch3

External References

Related Security Bulletins