Input validation error in PHP - CVE-2007-4657

 

Input validation error in PHP - CVE-2007-4657

Published: October 26, 2018 / Updated: June 8, 2025


Vulnerability identifier: #VU110368
CSH Severity: Medium
CVSS v4: []
CVE-ID: CVE-2007-4657
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows remote attackers to perform a denial of service (DoS) attack.

The vulnerability exists due to insufficient validation of user-supplied input. A remote attacker can obtain sensitive information (memory contents) or cause a denial of service (thread crash) via a large len value to the (1) strspn or (2) strcspn function, which triggers an out-of-bounds read.


Affected software

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

How to mitigate CVE-2007-4657

Install update from vendor's website.

PHP - update to 5.2.4
libapache2-mod-php5 (Ubuntu package) - addressed in versions 5.1.2-1ubuntu3.10, 5.1.6-1ubuntu2.7, 5.2.1-0ubuntu1.5, 5.2.3-1ubuntu6.1
php5-cgi (Ubuntu package) - addressed in versions 5.1.2-1ubuntu3.10, 5.1.6-1ubuntu2.7, 5.2.1-0ubuntu1.5, 5.2.3-1ubuntu6.1
php5-cli (Ubuntu package) - addressed in versions 5.1.2-1ubuntu3.10, 5.1.6-1ubuntu2.7, 5.2.1-0ubuntu1.5, 5.2.3-1ubuntu6.1
php5 (Debian package) - update to 5.2.0-8+etch9
php4 (Debian package) - update to 6:4.4.4-8+etch6

External References

Related Security Bulletins