{"answers":{"affected":"4 open source packages ship an affected version, including laminas/laminas-http and zendframework/zendframework. It affects 2 products.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-3007 exists.","fix":"Upgrade laminas/laminas-http to 2.14.2 or later.","what":"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."},"fix_prompt":"Check this codebase for CVE-2021-3007 and fix it if it is affected.\n\nWhat it is: 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.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-3007 exists.\n\nAffected packages and fixed versions:\n- laminas/laminas-http (Packagist): affected all versions; fixed in 2.14.2\n- laminas/laminas-http (Packagist): affected all versions; fixed in 2.14.2\n- zendframework/zendframework (Packagist): affected all versions up to 3.0.0; no fix listed\n- zendframework/zendframework (Packagist): affected all versions up to 3.0.0; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-3007/ (Markdown: https://insights.sbomify.com/CVE-2021-3007/index.md)","id":"CVE-2021-3007","markdown":"https://insights.sbomify.com/CVE-2021-3007/index.md","name":"CVE-2021-3007","record":{"aliases":["CLSA-2026-1779151616","CLSA-2026-1782867594","CLSA-2026-1783645389","GHSA-xx8f-qf9f-5fgw"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP HTTP library","requires_auth":"none","summary":"Remote code execution via unsafe deserialization in Laminas HTTP and Zend Framework when attacker-controlled data is processed.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"laminas-http","vendor":"getlaminas"},{"product":"zend_framework","vendor":"zend"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":"2021-05-18","github_poc":3,"max_poc_stars":1,"metasploit":0,"nuclei":1,"refs":[{"date":"2021-05-18T14:16:02Z","kind":"github_poc","ref":"https://github.com/Vulnmachines/ZF3_CVE-2021-3007","stars":1,"title":"ZendFramework_CVE-2021-3007 PoC"},{"date":"2025-12-05T08:35:10Z","kind":"github_poc","ref":"https://github.com/yunus-a1i/CVE-2021-3007-docker-poc","stars":0,"title":null},{"date":"2025-12-05T10:43:32Z","kind":"github_poc","ref":"https://github.com/KrE80r/cve-2021-3007-vulnerable","stars":0,"title":"CVE-2021-3007 Vulnerable Test Environment - Laminas/Zend Framework Deserialization RCE"},{"date":null,"kind":"nuclei","ref":"http/cves/2021/CVE-2021-3007.yaml","stars":null,"title":"Laminas Project laminas-http - Remote Code Execution"}],"tier":"weaponised"},"has_fix":true,"headline":"Remote code execution in zendframework and laminas-http","id":"CVE-2021-3007","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"deserialization","year":"2021"},"n_packages":4,"n_references":5,"next":{"headline":"Cross-site scripting in n/a","id":"CVE-2021-3010"},"packages":[{"ecosystem":"Packagist","fixed":["2.14.2"],"introduced":["0"],"last_affected":[],"package":"laminas/laminas-http","purl":null,"source":"GHSA-xx8f-qf9f-5fgw"},{"ecosystem":"Packagist","fixed":["2.14.2"],"introduced":["0"],"last_affected":[],"package":"laminas/laminas-http","purl":"pkg:composer/laminas/laminas-http","source":"GHSA-xx8f-qf9f-5fgw"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["3.0.0"],"package":"zendframework/zendframework","purl":null,"source":"GHSA-xx8f-qf9f-5fgw"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["3.0.0"],"package":"zendframework/zendframework","purl":"pkg:composer/zendframework/zendframework","source":"GHSA-xx8f-qf9f-5fgw"}],"prev":{"headline":"Missing authorization in n/a","id":"CVE-2021-3006"},"products":["n/a"],"published":"2021-01-04","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"Remote code execution via unsafe deserialization in Laminas HTTP and Zend Framework when attacker-controlled data is processed.","url":"https://insights.sbomify.com/CVE-2021-3007/"}