CVE-2007-4850

PHP 5.2.4 and 5.2.5 - Arbitrary File Read via cURL file:// Null Byte Bypass

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2007-4850. PoCs published by Maksymilian Arciemowicz.

AI-analyzed exploit summary This exploit leverages a PHP cURL safe mode bypass vulnerability by injecting a null byte to access restricted files. It demonstrates the issue by dumping the contents of the script itself via a file:// URL.

Description

curl/interface.c in the cURL library (aka libcurl) in PHP 5.2.4 and 5.2.5 allows context-dependent attackers to bypass safe_mode and open_basedir restrictions and read arbitrary files via a file:// request containing a \x00 sequence, a different vulnerability than CVE-2006-2563.

Exploits (1)

exploitdb WORKING POC VERIFIED
by Maksymilian Arciemowicz · phpremotephp
https://www.exploit-db.com/exploits/31053

This exploit leverages a PHP cURL safe mode bypass vulnerability by injecting a null byte to access restricted files. It demonstrates the issue by dumping the contents of the script itself via a file:// URL.

Classification
Working Poc 90%
Attack Type
Auth Bypass
Complexity
Trivial
Reliability
Reliable
Target: PHP 5.2.4, 5.2.5
No auth needed
Prerequisites: PHP with safe_mode enabled · cURL extension enabled
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (28)

Core 28
Core References
Third Party Advisory vdb-entry x_refsource_vupen
http://www.vupen.com/english/advisories/2008/1412
Mailing List vendor-advisory x_refsource_apple
http://lists.apple.com/archives/security-announce//2008/Jul/msg00003.html
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/31681
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/29009
Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/27413
Third Party Advisory vdb-entry x_refsource_vupen
http://www.vupen.com/english/advisories/2008/2268
Vendor Advisory vendor-advisory x_refsource_ubuntu
http://www.ubuntu.com/usn/usn-628-1
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/486856/100/0/threaded
Exploit third-party-advisory x_refsource_sreasonres
http://securityreason.com/achievement_securityalert/51
Mailing List mailing-list x_refsource_mlist
http://www.openwall.com/lists/oss-security/2008/05/02/2
Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://www.securityfocus.com/archive/1/492671/100/0/threaded
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/30411
Vendor Advisory x_refsource_confirm
http://www.php.net/ChangeLog-5.php
Vendor Advisory vendor-advisory x_refsource_mandriva
http://www.mandriva.com/security/advisories?name=MDVSA-2009:023
Vendor Advisory vendor-advisory x_refsource_mandriva
http://www.mandriva.com/security/advisories?name=MDVSA-2009:022
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/31200
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/32222
Third Party Advisory third-party-advisory x_refsource_sreason
http://securityreason.com/securityalert/3562
Third Party Advisory x_refsource_confirm
http://wiki.rpath.com/wiki/Advisories:rPSA-2008-0178
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/31326
Third Party Advisory vdb-entry x_refsource_vupen
http://www.vupen.com/english/advisories/2008/2780
Third Party Advisory, VDB Entry vdb-entry x_refsource_xf
https://exchange.xforce.ibmcloud.com/vulnerabilities/42134
Third Party Advisory, VDB Entry vdb-entry x_refsource_xf
https://exchange.xforce.ibmcloud.com/vulnerabilities/39852
Mailing List vendor-advisory x_refsource_apple
http://lists.apple.com/archives/security-announce/2008/Oct/msg00001.html
Vendor Advisory x_refsource_confirm
http://support.apple.com/kb/HT3216
Third Party Advisory third-party-advisory x_refsource_secunia
http://secunia.com/advisories/30048

Scores

EPSS 0.0558
EPSS Percentile 91.9%

Details

CWE
CWE-264
Status published
Products (2)
php/php 5.2.4
php/php 5.2.5
Published Jan 25, 2008
Tracked Since Feb 18, 2026