CVE-2002-0470
Description
PHPNetToolpack 0.1 relies on its environment's PATH to find and execute the traceroute program, which could allow local users to gain privileges by inserting a Trojan horse program into the search path.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1- cpe:2.3:a:phpnettoolpack:phpnettoolpack:0.1:*:*:*:*:*:*:*
Patches
Vulnerability mechanics
Root cause
"The script calls traceroute without a full path, relying on the environment's PATH variable to locate the executable."
Attack vector
A local attacker can place a malicious program named `traceroute` earlier in the system's PATH than the real traceroute binary. When the PHP script executes `exec("traceroute $a_query",$ret_strs)` without specifying a full path, the operating system resolves the command to the attacker's Trojan horse instead of the legitimate `/sbin/traceroute` [ref_id=1]. The attacker does not need to exploit the remote command injection vector; the PATH-based hijacking works independently whenever the script is invoked.
Affected code
The vulnerability is in the `traceroute` function of PHPNetToolpack 0.1. The code fragment `exec("traceroute $a_query",$ret_strs)` uses the user-supplied `$a_query` variable without any filtering and calls `traceroute` without a full path [ref_id=1].
What the fix does
The advisory recommends replacing the bare `exec("traceroute $a_query",$ret_strs)` with two lines: first sanitize the input via `escapeshellcmd($a_query)`, then call `exec("/sbin/traceroute $sec_input",$ret_strs)` using the full path `/sbin/traceroute` [ref_id=1]. Using the full path prevents the operating system from searching the user-controlled PATH, so a Trojan horse placed earlier in the search path will never be selected. No official patch has been published because the vendor did not respond and the project appears unmaintained [ref_id=1].
Preconditions
- inputThe attacker must have local access to the system and be able to write an executable file named 'traceroute' into a directory that appears earlier in the PATH than the real traceroute binary.
- configThe PHP script must be invoked (e.g., via a web request) while the attacker's directory is earlier in the PATH.
Generated on May 26, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
3- www.iss.net/security_center/static/8484.phpnvdVendor Advisory
- www.securityfocus.com/bid/4304nvdVendor Advisory
- seclists.org/bugtraq/2002/Mar/0263.htmlnvd
News mentions
0No linked articles in our index yet.