CVE-2007-2087 in CNStatsinfo

Summary

by MITRE

Multiple PHP remote file inclusion vulnerabilities in CNStats 2.12, when register_globals is enabled and .htaccess is not recognized, allow remote attackers to execute arbitrary PHP code via a URL in the bn parameter to (1) who_r.php or (2) who_s.php in reports/. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 07/07/2025

The vulnerability described in CVE-2007-2087 represents a critical remote code execution flaw within CNStats 2.12 web application that leverages improper input validation and insecure configuration practices. This vulnerability specifically targets the reports directory of the application where two distinct files who_r.php and who_s.php are susceptible to malicious input manipulation through the bn parameter. The flaw occurs when the PHP application operates with register_globals enabled, a dangerous configuration that automatically converts HTTP request variables into global variables, creating an attack surface where malicious inputs can be seamlessly integrated into the application's execution flow.

The technical exploitation of this vulnerability stems from the application's failure to properly validate and sanitize user-supplied input before incorporating it into dynamic PHP execution contexts. When register_globals is enabled, the attacker can manipulate the bn parameter to inject malicious URLs that point to remote resources containing arbitrary PHP code. This creates a classic remote file inclusion vulnerability where the application's inclusion mechanism treats the malicious URL as a legitimate source for code execution. The vulnerability is particularly dangerous because it operates at the core level of PHP's include/require functions, allowing attackers to execute arbitrary code on the target server with the privileges of the web application.

The operational impact of this vulnerability extends beyond simple code execution to encompass complete system compromise and data breach potential. An attacker could leverage this vulnerability to gain unauthorized access to the web server, potentially leading to full system control, data exfiltration, or deployment of additional malicious payloads. The vulnerability affects the application's reporting functionality specifically, which often contains sensitive data and may have elevated privileges compared to regular user interfaces. The fact that this vulnerability requires only a single parameter manipulation makes it highly attractive to attackers and increases the likelihood of successful exploitation in real-world scenarios.

The security implications of CVE-2007-2087 align with CWE-88, which describes improper neutralization of special elements used in an input data stream, and CWE-94, which covers execution of arbitrary code in the context of the affected application. From an ATT&CK framework perspective, this vulnerability maps to T1190 - Exploit Public-Facing Application and T1059 - Command and Scripting Interpreter, representing the attack vectors of exploiting web applications and executing code through PHP interpreters. The vulnerability demonstrates a fundamental misconfiguration issue where the application's security relies on the proper configuration of the underlying PHP environment rather than robust input validation. Organizations should immediately disable register_globals in their PHP configurations and implement proper input validation techniques to prevent such vulnerabilities from being exploited in the future.

Mitigation strategies for this vulnerability should include immediate patching of the CNStats application to version 2.13 or later, which likely contains the necessary fixes for the remote file inclusion issue. System administrators should ensure that register_globals is disabled in all PHP configurations and implement proper input validation and sanitization for all user-supplied parameters. The use of allow_url_include and allow_url_fopen directives should be disabled in php.ini files to prevent remote file inclusion attacks. Additionally, implementing web application firewalls and intrusion detection systems can provide additional layers of protection by monitoring for suspicious URL patterns and parameter manipulation attempts. Regular security audits and vulnerability assessments should be conducted to identify similar configuration issues and ensure that applications are not running with dangerous PHP settings that could enable similar attack vectors.

Reservation

04/17/2007

Disclosure

04/18/2007

Moderation

accepted

Entry

VDB-36233

CPE

ready

Exploit

Download

EPSS

0.01748

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!