Uncontrolled Recursion in PHP - CVE-2007-1285

 

Uncontrolled Recursion in PHP - CVE-2007-1285

Published: February 2, 2024 / Updated: June 13, 2025


Vulnerability identifier: #VU110454
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2007-1285
CWE-ID: CWE-674
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote non-authenticated attacker to perform a denial of service (DoS) attack.

The Zend Engine in PHP 4.x before 4.4.7, and 5.x before 5.2.2, allows remote attackers to cause a denial of service (stack exhaustion and PHP crash) via deeply nested arrays, which trigger deep recursion in the variable destruction routines.


Affected software

PHP
Gentoo Linux
Ubuntu
php5-cli (Ubuntu package)
php5-cgi (Ubuntu package)
libapache2-mod-php5 (Ubuntu package)
dev-lang/php

How to mitigate CVE-2007-1285

Install update from vendor's website.

PHP - update to 4.4.7
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-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
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
dev-lang/php - update to 5.2.2

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins