CVE-2021-3007 Remote code execution in zendframework and laminas-http
Remote code execution via unsafe deserialization in Laminas HTTP and Zend Framework when attacker-controlled data is processed.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-3007?
CVE-2021-3007 is a critical unsafe deserialization vulnerability in n/a, published on 4 Jan 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Laminas Project laminas-http before 2.14.2, and Zend Framework 3.0.0, has a deserialization vulnerability that can lead to remote code execution if the content is controllable, related to the __destruct method of the Zend\Http\Response\Stream class in Stream.php. NOTE: Zend Framework is no longer supported by the maintainer. NOTE: the laminas-http vendor considers this a "vulnerability in the PHP language itself" but has added certain type checking as a way to prevent exploitation in (unrecommended) use cases where attacker-supplied data can be deserialized
Weakness: CWE-502
Which versions are affected by CVE-2021-3007?
4 open source packages ship an affected version, including laminas/laminas-http and zendframework/zendframework. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
laminas/laminas-http Packagist | All versions | 2.14.2 |
laminas/laminas-http Packagist | All versions | 2.14.2 |
zendframework/zendframework Packagist | All versions to 3.0.0 | None |
zendframework/zendframework Packagist | All versions to 3.0.0 | None |
Products include Getlaminas Laminas-Http, Zend Zend Framework.
How do I fix CVE-2021-3007?
Upgrade laminas/laminas-http to 2.14.2 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2021-3007 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-3007 exists.
Public exploit code: 1 Nuclei template and 3 proofs of concept on GitHub.
Sources
Also known as CLSA-2026-1779151616, CLSA-2026-1782867594, CLSA-2026-1783645389, GHSA-xx8f-qf9f-5fgw.