CWE
NVD-CWE-Other
Advisory Published
Rejected
Updated

CVE-2004-1020

First published: Wed Dec 08 2004(Updated: )

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.

Credit: cve@mitre.org

Affected SoftwareAffected VersionHow to fix
PHP=4.3.9
PHP=5.0-rc1
PHP=4.3.6
PHP=5.0.1
PHP=4.3.7
PHP=5.0-rc3
PHP=5.0-rc2
PHP=5.0.2
PHP=5.0.0
PHP=4.3.8

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2004-1020?

    CVE-2004-1020 is considered a critical vulnerability due to its potential to allow remote file read access.

  • How do I fix CVE-2004-1020?

    To fix CVE-2004-1020, upgrade your PHP version to one that is not affected, such as PHP 5.0.3 or later.

  • What versions of PHP are affected by CVE-2004-1020?

    CVE-2004-1020 affects PHP versions 4.3.6 to 4.3.9 and beta versions of 5.0 up to 5.0.2.

  • What type of attacks can exploit CVE-2004-1020?

    CVE-2004-1020 can be exploited through remote code execution techniques, particularly directory traversal attacks.

  • Are there any mitigations for CVE-2004-1020?

    Mitigations for CVE-2004-1020 include disabling the use of the addslashes function in PHP and rigorously filtering input for file inclusion operations.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203