CVE-2002-0484
Description
move_uploaded_file in PHP does not does not check for the base directory (open_basedir), which could allow remote attackers to upload files to unintended locations on the system.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
37cpe:2.3:a:php:php:3.0:*:*:*:*:*:*:*+ 36 more
- cpe:2.3:a:php:php:3.0:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.1:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.10:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.11:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.12:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.13:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.14:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.15:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.16:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.17:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.18:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.2:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.3:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.4:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.5:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.6:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.7:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.8:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:3.0.9:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.1:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.1:patch1:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.1:patch2:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.2:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.3:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.3:patch1:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.4:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.5:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.6:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.7:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.7:rc1:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.7:rc2:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.0.7:rc3:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.1.0:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.1.1:*:*:*:*:*:*:*
- cpe:2.3:a:php:php:4.1.2:*:*:*:*:*:*:*
- (no CPE)
Patches
Vulnerability mechanics
Root cause
"The `move_uploaded_file` function in PHP did not properly check `open_basedir` restrictions."
Attack vector
An attacker could craft a script that utilizes the `move_uploaded_file` function to upload a file to an arbitrary location on the server, bypassing `safe_mode` and `open_basedir` restrictions [ref_id=1]. This is possible because the function, by default, does not verify if the destination path adheres to the configured `open_basedir` settings [ref_id=1]. The attacker would need to have a web-accessible script that can execute PHP code and upload files.
Affected code
The vulnerability lies within the `move_uploaded_file` function in PHP. Specifically, the issue was that this function did not adequately enforce `open_basedir` restrictions, allowing uploaded files to be moved to directories outside the permitted scope [ref_id=1]. A proposed fix involved adding a call to `php_check_open_basedir` within the function's logic.
What the fix does
The fix involves ensuring that `move_uploaded_file` respects `open_basedir` restrictions by calling `php_check_open_basedir` on the destination path before moving the file [ref_id=1]. This check verifies that the target directory is within the allowed paths defined by `open_basedir`, thereby preventing files from being written to unintended locations.
Preconditions
- configPHP must be configured with `safe_mode` or `open_basedir` restrictions enabled.
- inputThe attacker must be able to upload a file via a web script.
Generated on Jun 2, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- online.securityfocus.com/archive/1/262999nvdVendor Advisory
- online.securityfocus.com/archive/1/263259nvdVendor Advisory
- bugs.php.net/bug.phpnvd
- marc.infonvd
- www.iss.net/security_center/static/8591.phpnvd
- www.securityfocus.com/bid/4325nvd
News mentions
0No linked articles in our index yet.