CVE-2004-1020 Path traversal in n/a

Medium 5.0 Published Updated

Remote attackers can read arbitrary files by exploiting improper NULL character escaping in addslashes, bypassing magic_quotes_gpc protections.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2004-1020?

CVE-2004-1020 is a medium-severity path traversal vulnerability in Php Php, published on 8 Dec 2004. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The addslashes function in PHP 4.3.9 does not properly escape a NULL (/0) character, which may allow remote attackers to read arbitrary files in PHP applications that contain a directory traversal vulnerability in require or include statements, but are otherwise protected by the magic_quotes_gpc mechanism. NOTE: this issue was originally REJECTed by its CNA before publication, but that decision is in active dispute. This candidate may change significantly in the future as a result of further discussion.

Which versions are affected by CVE-2004-1020?

It affects 1 product.

Products include Php Php.

How do I fix CVE-2004-1020?

No fix has been published for CVE-2004-1020 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2004-1020 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2004-1020 exists.

Public exploit code: 1 Exploit-DB entry.

All Php Php vulnerabilities

Sources

Also known as GHSA-h7q9-pqp4-r828.

Is CVE-2004-1020 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free