vendor:
PHP
by:
Heintz
7.5
CVSS
HIGH
Memory Corruption
119
CWE
Product Name: PHP
Affected Version From: Unknown
Affected Version To: Unknown
Patch Exists: NO
Related CWE:
CPE: a:php:php
Platforms Tested:
2006
PHP sscanf Vulnerability
This exploit takes advantage of a vulnerability in the sscanf function in PHP. By providing a format argument with argument swap and extra arguments, an attacker can overwrite memory and execute arbitrary code. The exploit involves filling PHP's internally cached memory with the address of a pointer to a writable segment, unsetting a variable to free the memory but not zero it, and passing our own pointers to sscanf. By constructing a binary zval structure with shellcode, we can successfully call sscanf and execute code.
Mitigation:
Update to a version of PHP that includes a patch for this vulnerability. Avoid using sscanf with untrusted input.