Remote file inclusion and directory traversal in cpCommerce 1.2.x _functions.php
cpCommerce 1.2.x contains a vulnerability in _functions.php when the library file is requested directly. The file issues an HTTP redirect as a protection mechanism but does not terminate execution afterward, allowing subsequent code to continue running. An attacker can exploit this flawed control flow to bypass the intended direct-access restriction and supply crafted input through the GLOBALS[prefix] parameter. This enables remote file inclusion and directory traversal, which can lead to arbitrary PHP code execution or arbitrary file read, depending on server configuration and available targets. The issue affects cpCommerce 1.2.x, including possibly 1.2.9, and is distinct from the vector described in CVE-2003-1500.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can allow an unauthenticated remote attacker to bypass a protection mechanism intended to prevent direct access to an internal PHP file. Depending on configuration, the attacker may include attacker-controlled or unintended local resources, execute arbitrary PHP code in the context of the web application, or read arbitrary files accessible to the application. This can result in compromise of confidentiality through file disclosure, integrity compromise through execution of unauthorized code, and potentially broader server compromise under the privileges of the web server process.
If you can’t patch tonight, do this now.
Restrict direct web access to internal library files through web server configuration and place non-public include files outside the document root where possible. Disable remote file inclusion behavior at the PHP configuration level where feasible and enforce least-privilege filesystem permissions for the web server account to limit file read and code execution impact. Additional defense-in-depth measures include monitoring for abnormal direct requests to internal PHP components and using application-layer protections to block traversal and inclusion patterns.
Patch, then assume compromise.
Upgrade to a fixed version if one is available from the vendor. Correct the vulnerable code path in _functions.php so that any redirect or direct-access denial is immediately followed by termination of script execution. Eliminate use of externally controllable include path components, especially through GLOBALS-derived input, and ensure include targets are selected from a strict internal allowlist rather than user-supplied values. Validate and canonicalize path-related input before use, and prevent traversal outside intended directories.
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.