CVE-2009-4137

Matomo < 0.5 - Remote Code Execution via Cookie Unserialize

Title source: manual
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2009-4137. PoCs published by Alexeyan.

AI-analyzed exploit summary This exploit leverages PHP object injection in Piwik via a malicious serialized `Piwik_Config` object. It bypasses the PHP showstopper by using `php://filter` with base64 encoding to write a webshell to `/var/www/piwik/webshell.php`.

Description

The loadContentFromCookie function in core/Cookie.php in Piwik before 0.5 does not validate strings obtained from cookies before calling the unserialize function, which allows remote attackers to execute arbitrary code or upload arbitrary files via vectors related to the __destruct function in the Piwik_Config class; php://filter URIs; the __destruct functions in Zend Framework, as demonstrated by the Zend_Log destructor; the shutdown functions in Zend Framework, as demonstrated by the Zend_Log_Writer_Mail class; the render function in the Piwik_View class; Smarty templates; and the _eval function in Smarty.

Exploits (1)

nomisec WORKING POC 4 stars
by Alexeyan · poc
https://github.com/Alexeyan/CVE-2009-4137

This exploit leverages PHP object injection in Piwik via a malicious serialized `Piwik_Config` object. It bypasses the PHP showstopper by using `php://filter` with base64 encoding to write a webshell to `/var/www/piwik/webshell.php`.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Piwik (version affected by CVE-2009-4137)
No auth needed
Prerequisites: PHP object injection vulnerability in Piwik · Ability to set a cookie with the serialized payload
devstral-2 · analyzed Feb 18, 2026 Full analysis →

Scores

EPSS 0.0488
EPSS Percentile 89.7%

Details

CWE
CWE-20
Status published
Products (8)
matomo/matomo 0.2.25
matomo/matomo 0.2.26
matomo/matomo 0.2.27
matomo/matomo 0.2.28
matomo/matomo 0.2.29
matomo/matomo 0.2.30
matomo/matomo 0.2.31
matomo/matomo 0.2.32
Published Dec 24, 2009
Tracked Since Feb 18, 2026