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
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 3 repositories
-
Vulnmachines/ZF3_CVE-2021-3007 ★ 1 · May 18, 2021
ZendFramework_CVE-2021-3007 PoC
-
KrE80r/cve-2021-3007-vulnerable ★ 0 · Dec 5, 2025
CVE-2021-3007 Vulnerable Test Environment - Laminas/Zend Framework Deserialization RCE
-
yunus-a1i/CVE-2021-3007-docker-poc ★ 0 · Dec 5, 2025
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Laminas Project laminas-http - Remote Code Execution http/cves/2021/CVE-2021-3007.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | laminas/laminas-http | < 2.14.2 | 2.14.2 | GHSA-xx8f-qf9f-5fgw |
| Packagist | zendframework/zendframework | <= 3.0.0 | — | GHSA-xx8f-qf9f-5fgw |
References
- https://github.com/Ling-Yizhou/zendframework3-/blob/main/zend%20framework3%20%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%20rce.md
- https://github.com/laminas/laminas-http/commits/2.15.x/src/Response/Stream.php
- https://github.com/laminas/laminas-http/pull/48
- https://github.com/laminas/laminas-http/releases/tag/2.14.2
- https://research.checkpoint.com/2021/freakout-leveraging-newest-vulnerabilities-for-creating-a-botnet/