CVE-2009-4137
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.
CVSS
- Version: 2.0
- Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P
- Base score: 7.5
Exploitation probability (EPSS)
- Probability of exploitation in the next 30 days: 17%
- Percentile among all scored CVEs: 97
- Score date: 10/7/2026
EPSS (Exploit Prediction Scoring System, FIRST) estimates how likely a vulnerability is to be exploited in the wild within 30 days. It complements CVSS (impact) and CISA KEV (confirmed exploitation).
💥 Public exploits
Exploit code or detection templates are publicly available. This is not the same as confirmed active exploitation (KEV), but it raises the risk: patch with priority.
- Proof of concept on GitHub (unverified) · List of proofs of concept on GitHub
⚠️ GitHub proofs of concept are not verified: some are fake or contain malware. Never run them outside an isolated lab.
Affected technologies (1)
CWEs
- CWE-20
References
- http://dev.piwik.org/trac/changeset/1637
- http://piwik.org/blog/2009/12/piwik-response-to-shocking-news-in-php-exploitation/
- http://www.openwall.com/lists/oss-security/2009/12/09/2
- http://www.openwall.com/lists/oss-security/2009/12/10/1
- http://www.openwall.com/lists/oss-security/2009/12/14/2
- http://www.sektioneins.de/en/advisories/advisory-032009-piwik-cookie-unserialize-vulnerability/
- http://www.suspekt.org/2009/12/09/advisory-032009-piwik-cookie-unserialize-vulnerability/
- http://www.suspekt.org/downloads/POC2009-ShockingNewsInPHPExploitation.pdf
- http://dev.piwik.org/trac/changeset/1637
- http://piwik.org/blog/2009/12/piwik-response-to-shocking-news-in-php-exploitation/
- http://www.openwall.com/lists/oss-security/2009/12/09/2
- http://www.openwall.com/lists/oss-security/2009/12/10/1
- http://www.openwall.com/lists/oss-security/2009/12/14/2
- http://www.sektioneins.de/en/advisories/advisory-032009-piwik-cookie-unserialize-vulnerability/
- http://www.suspekt.org/2009/12/09/advisory-032009-piwik-cookie-unserialize-vulnerability/
- http://www.suspekt.org/downloads/POC2009-ShockingNewsInPHPExploitation.pdf
Raw JSON (NVD)
Show
{
"id": "CVE-2009-4137",
"cveTags": [],
"metrics": {
"cvssMetricV2": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"version": "2.0",
"baseScore": 7.5,
"accessVector": "NETWORK",
"vectorString": "AV:N/AC:L/Au:N/C:P/I:P/A:P",
"authentication": "NONE",
"integrityImpact": "PARTIAL",
"accessComplexity": "LOW",
"availabilityImpact": "PARTIAL",
"confidentialityImpact": "PARTIAL"
},
"acInsufInfo": false,
"impactScore": 6.4,
"baseSeverity": "HIGH",
"obtainAllPrivilege": false,
"exploitabilityScore": 10,
"obtainUserPrivilege": false,
"obtainOtherPrivilege": false,
"userInteractionRequired": false
}
]
},
"affected": [
{
"source": "secalert@redhat.com",
"affectedData": [
{
"vendor": "n/a",
"product": "n/a",
"versions": [
{
"status": "affected",
"version": "n/a"
}
]
}
]
}
],
"published": "2009-12-24T16:30:00.250",
"references": [
{
"url": "http://dev.piwik.org/trac/changeset/1637",
"tags": [
"Vendor Advisory"
],
"source": "secalert@redhat.com"
},
{
"url": "http://piwik.org/blog/2009/12/piwik-response-to-shocking-news-in-php-exploitation/",
"tags": [
"Vendor Advisory"
],
"source": "secalert@redhat.com"
},
{
"url": "http://www.openwall.com/lists/oss-security/2009/12/09/2",
"source": "secalert@redhat.com"
},
{
"url": "http://www.openwall.com/lists/oss-security/2009/12/10/1",
"source": "secalert@redhat.com"
},
{
"url": "http://www.openwall.com/lists/oss-security/2009/12/14/2",
"source": "secalert@redhat.com"
},
{
"url": "http://www.sektioneins.de/en/advisories/advisory-032009-piwik-cookie-unserialize-vulnerability/",
"source": "secalert@redhat.com"
},
{
"url": "http://www.suspekt.org/2009/12/09/advisory-032009-piwik-cookie-unserialize-vulnerability/",
"source": "secalert@redhat.com"
},
{
"url": "http://www.suspekt.org/downloads/POC2009-ShockingNewsInPHPExploitation.pdf",
"source": "secalert@redhat.com"
},
{
"url": "http://dev.piwik.org/trac/changeset/1637",
"tags": [
"Vendor Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://piwik.org/blog/2009/12/piwik-response-to-shocking-news-in-php-exploitation/",
"tags": [
"Vendor Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.openwall.com/lists/oss-security/2009/12/09/2",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.openwall.com/lists/oss-security/2009/12/10/1",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.openwall.com/lists/oss-security/2009/12/14/2",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.sektioneins.de/en/advisories/advisory-032009-piwik-cookie-unserialize-vulnerability/",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.suspekt.org/2009/12/09/advisory-032009-piwik-cookie-unserialize-vulnerability/",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "http://www.suspekt.org/downloads/POC2009-ShockingNewsInPHPExploitation.pdf",
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-20"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "La función loadContentFromCookie en core/Cookie.php en Piwik before v0.5 no valida cadenas obtenidoas desde cookies antes de llamar a la función unserialize, lo que permite a atacantes remotos ejecuta código o cargar archivos de su elección a través de vectores relacionados con la función the __destruct en la clase Piwik_Config; php://filter URIs; las funciones __destruct en Zend Framework, como quedó demostrado por el destructor Zend_Log; las funciones shutdown en Zend Framework, como quedó demostrado por la clase Zend_Log_Writer_Mail; la función render en la clase Piwik_View; plantillas Smarty ; y la función _eval en Smarty."
}
],
"lastModified": "2026-06-16T23:13:06.470",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.25:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "262A0DB0-6CE4-41E7-BDC6-18924C76EDCB"
},
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.26:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "D3F37F31-2288-4B86-9EEB-38EE8B1979C2"
},
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.27:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "74DBC09F-4B09-490B-8367-93B3257F9DBF"
},
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.28:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "0384553E-FEEB-4AE4-B1F1-1EC99BE07BD9"
},
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.29:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "E64C21FE-BCA5-4830-AA85-5959CBE3800D"
},
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.30:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "BF976D83-866E-416D-A21C-2BF2A8F95462"
},
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.31:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "1E9EB7C0-C645-4E1A-A7CD-87325BBA81E5"
},
{
"criteria": "cpe:2.3:a:matomo:matomo:0.2.32:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "998651DF-2552-4A8E-9EA9-AEEED3D39BCB"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "secalert@redhat.com"
}