CVE-2009-4140 in Open Flash Chartinfo

Summary

by MITRE

Unrestricted file upload vulnerability in ofc_upload_image.php in Open Flash Chart v2 Beta 1 through v2 Lug Wyrm Charmer, as used in Piwik 0.2.35 through 0.4.3, Woopra Analytics Plugin before 1.4.3.2, and possibly other products, when register_globals is enabled, allows remote authenticated users to execute arbitrary code by uploading a file with an executable extension through the name parameter with the code in the HTTP_RAW_POST_DATA parameter, then accessing it via a direct request to the file in tmp-upload-images/.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 02/01/2025

The vulnerability described in CVE-2009-4140 represents a critical unrestricted file upload flaw that exists within the Open Flash Chart library version 2 Beta 1 through Lug Wyrm Charmer. This vulnerability specifically affects several web applications including Piwik versions 0.2.35 through 0.4.3 and the Woopra Analytics Plugin before version 1.4.3.2. The flaw becomes particularly dangerous when the web server has register_globals enabled, a configuration that was common in older php environments but is now considered deprecated due to security concerns. The vulnerability operates through a sophisticated attack vector that leverages the interaction between the ofc_upload_image.php script and the HTTP_RAW_POST_DATA parameter, allowing authenticated attackers to bypass normal file upload restrictions.

The technical mechanism behind this vulnerability stems from inadequate input validation and sanitization within the file upload process. When an authenticated user uploads a file through the name parameter, the system fails to properly validate the file extension or content, particularly when register_globals is enabled. This allows attackers to embed malicious code within what appears to be a legitimate image file, exploiting the fact that the system does not properly check the file type or content against its intended purpose. The vulnerability specifically targets the tmp-upload-images/ directory where uploaded files are stored, making it possible for attackers to execute arbitrary code by simply accessing the uploaded file through a direct HTTP request. This attack pattern aligns with CWE-434 which describes "Unrestricted Upload of File with Dangerous Type" and represents a classic example of how insufficient validation can lead to remote code execution.

The operational impact of this vulnerability is severe and multifaceted, affecting organizations using affected versions of the vulnerable software. Attackers can leverage this vulnerability to gain remote code execution capabilities, potentially leading to complete system compromise, data exfiltration, and persistent backdoor access. The authenticated nature of the attack means that attackers need valid user credentials, but this requirement is often achievable through various social engineering techniques or credential compromise methods. The vulnerability's persistence in multiple products including Piwik and Woopra Analytics demonstrates how widely this issue affected the web analytics ecosystem, making it particularly concerning for organizations that relied on these platforms for tracking and monitoring their web presence. The risk is amplified by the fact that many organizations may have been running these older versions for extended periods without proper patching, creating a substantial attack surface.

Mitigation strategies for this vulnerability must address both the immediate security gap and the underlying architectural issues that enabled the flaw. The primary recommendation involves upgrading to patched versions of the affected software, specifically ensuring that Piwik is updated to version 0.4.4 or later and Woopra Analytics Plugin to 1.4.3.2 or newer. Organizations should also disable register_globals on their web servers as this configuration significantly increases the attack surface for such vulnerabilities. Additional protective measures include implementing strict file type validation, using random file names and extensions, storing uploaded files outside the web root directory, and implementing proper access controls for the tmp-upload-images directory. The vulnerability also highlights the importance of following secure coding practices such as those outlined in the OWASP Secure Coding Practices and aligns with ATT&CK technique T1505.003 for "Access Through Removable Media" and T1059.007 for "Command and Scripting Interpreter: PowerShell" as attackers may leverage the uploaded files to establish persistent access through command execution. Security monitoring should include detection of unusual file upload patterns and direct access attempts to temporary upload directories to identify potential exploitation attempts.

Reservation

12/01/2009

Disclosure

12/22/2009

Moderation

accepted

Entry

VDB-51250

CPE

ready

Exploit

Download

EPSS

0.75838

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!