Input validation error in PHP - CVE-2006-4020

 

Input validation error in PHP - CVE-2006-4020

Published: February 14, 2024 / Updated: June 12, 2025


Vulnerability identifier: #VU110479
CSH Severity: Low
CVSS v4: 4.8 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2006-4020
CWE-ID: CWE-20
Exploitation vector: Local access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a local user to read and manipulate data.

scanf.c in PHP 5.1.4 and earlier, and 4.4.3 and earlier, allows context-dependent attackers to execute arbitrary code via a sscanf PHP function call that performs argument swapping, which increments an index past the end of an array and triggers a buffer over-read.


Affected software

PHP
Gentoo Linux
dev-lang/php

How to mitigate CVE-2006-4020

Install update from vendor's website.

PHP - addressed in versions 4.4.4, 4.10, 5.1.5
dev-lang/php - update to 5.1.4-r6

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins