# CVE-2021-3007: Remote code execution in zendframework and laminas-http

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 75.31% (percentile 100, 2026-11-28)
- **CWE:** CWE-502
- **Aliases:** GHSA-xx8f-qf9f-5fgw
- **Published:** 2021-01-04T02:26:45.000Z
- **Modified:** 2026-06-17T04:04:33.270Z

## Who should check

- Projects that depend on Packagist package zendframework/zendframework (\<= 3.0.0)
- Projects that depend on Packagist package laminas/laminas-http (\< 2.14.2)
- Anyone running n/a (versions: see the vendor advisory)

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

## Affected and fixed versions

- Packagist `zendframework/zendframework`: affected \<= 3.0.0; fixed no fix listed yet (osv)
- Packagist `laminas/laminas-http`: affected \< 2.14.2; fixed 2.14.2 (osv)
- n/a: see vendor advisory (nvd)

## Mitigation

- Upgrade laminas/laminas-http to 2.14.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-3007. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-3007.md
Affected: zendframework/zendframework <= 3.0.0; laminas/laminas-http < 2.14.2
Fixed in: 2.14.2

Steps:
1. Search this machine and project for zendframework/zendframework (Packagist), laminas/laminas-http (Packagist), n/a: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-3007 being exploited?

There is no confirmed exploitation: CVE-2021-3007 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 75.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2021-3007?

Critical: CVSS 9.8 (v3.1, scored by NVD). Remote, no login needed.

### Which versions are affected by CVE-2021-3007?

zendframework/zendframework \<= 3.0.0; laminas/laminas-http \< 2.14.2.

### Is there a fix for CVE-2021-3007?

Yes. Fixed in 2.14.2. Upgrade laminas/laminas-http to 2.14.2 or later.

### How do I check if I'm affected by CVE-2021-3007?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-3007>
- patch: <https://github.com/laminas/laminas-http/commits/2.15.x/src/Response/Stream.php>
- patch: <https://github.com/laminas/laminas-http/pull/48>
- exploit: <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>
- exploit: <https://research.checkpoint.com/2021/freakout-leveraging-newest-vulnerabilities-for-creating-a-botnet/>
- other: <https://github.com/laminas/laminas-http/releases/tag/2.14.2>
- other: <https://research.checkpoint.com/2021/freakout-leveraging-newest-vulnerabilities-for-creating-a-botnet>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-3007>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-xx8f-qf9f-5fgw> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-3007> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-3007>
