CVE-2004-1392: open_basedir Bypass via cURL in PHP 4.0
- Vendor
- PHP Group
In PHP 4.0, the cURL extension allows remote attackers to bypass the open_basedir restriction by passing a file: URL to the curl_init function. This enables reading of arbitrary files on the filesystem, regardless of the open_basedir configuration intended to restrict such access.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Attackers can read arbitrary files on the server, potentially exposing sensitive information such as configuration files, credentials, or application data, even when open_basedir is set to restrict file access.
Mitigation
If you can’t patch tonight, do this now.
Disable the cURL extension if not required, or restrict its usage. Use additional access controls at the OS level to prevent unauthorized file access. Monitor and audit PHP scripts for improper use of cURL with file: URLs.
Remediation
Patch, then assume compromise.
Upgrade to a version of PHP where this vulnerability is patched. Ensure that the cURL extension properly enforces open_basedir restrictions when handling file: URLs.
Exploits
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2004-1392 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2004-1392 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2004-1392?
- Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2004-1392.
- Is there a patch for CVE-2004-1392?
- Upgrade to a version of PHP where this vulnerability is patched. Ensure that the cURL extension properly enforces open_basedir restrictions when handling file: URLs.
- What products are affected by CVE-2004-1392?
- PHP Group Php.
- How severe is CVE-2004-1392?
- CVE-2004-1392 has a CVSS v2 score of 5.0 (Medium) and an EPSS score of 10.8% (96th percentile) as of Oct 16, 2026.
Recent activity
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.