CVE-2021-3007: Insecure Deserialization in Laminas HTTP and Zend Framework
- Vendors
- GetlaminasZend
CVE-2021-3007 is an insecure deserialization vulnerability affecting Laminas Project laminas-http before 2.14.2 and Zend Framework 3.0.0. It involves the __destruct() method of Zend\Http\Response\Stream and can be triggered when an application deserializes attacker-controlled PHP objects. The stream cleanup gadget can perform arbitrary file deletion, while chaining with other available application classes can enable remote code execution. The laminas-http maintainer characterizes the underlying issue as a PHP-language vulnerability and added type checking to prevent exploitation in applications that deserialize untrusted data. Zend Framework is no longer supported.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can delete files accessible to the application process and, depending on available gadget classes, execute attacker-controlled code on the server. Exploitation has been associated with FreakOut and Necro botnet infections and deployment of XMRig cryptocurrency miners. Installing an affected library alone does not establish exploitability; an application must expose an unsafe deserialization path.
Mitigation
If you can’t patch tonight, do this now.
Do not pass attacker-supplied data to PHP unserialize() in contexts that can instantiate the affected stream classes. Replace PHP object serialization with a safer data format such as JSON where feasible, and enforce input validation and trust boundaries for user input, cookies, headers, and request bodies.
Remediation
Patch, then assume compromise.
Upgrade laminas/laminas-http to version 2.14.2 or later. Migrate unsupported Zend Framework applications to a supported alternative using a fixed HTTP package. For affected OpenMage Magento LTS deployments, upgrade to version 19.4.13 or later on the 19.x branch, or 20.0.9 or later on the 20.x branch. Remove application-level deserialization of untrusted PHP objects even after updating the dependency.
Exploits
1 exploit validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2021-3007 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2021-3007?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2021-3007, the earliest disclosed Dec 5, 2025.
- Is there a patch for CVE-2021-3007?
- Upgrade laminas/laminas-http to version 2.14.2 or later. Migrate unsupported Zend Framework applications to a supported alternative using a fixed HTTP package.
- What products are affected by CVE-2021-3007?
- Zend Framework and Getlaminas Laminas-Http.
- How severe is CVE-2021-3007?
- CVE-2021-3007 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 75.3% (100th percentile) as of Oct 16, 2026.
Recent activity
12 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.