CVE-2021-3007: Remote Code Execution in zendframework and laminas-http
Summary
CVE-2021-3007: Remote code execution in zendframework and laminas-http. Affects zendframework/zendframework versions < 3.0.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The zendframework package, available on Packagist, is a PHP framework that provides a collection of professional PHP packages. It is widely used for developing web applications and services. The laminas-http package, also available on Packagist, is a component of the Laminas Project, which is a continuation of the Zend Framework. It provides HTTP-related functionality for PHP applications. Both packages are vulnerable to a deserialization vulnerability in the Zend\Http\Response\Stream class, specifically in the __destruct method of the Stream.php file. This vulnerability allows an attacker to execute remote code if they can control the content. It is important to note that while Zend Framework is no longer supported, not all vulnerabilities in Zend Framework 3.0.0 exist in Laminas Project releases.
Vulnerability Detail
The deserialization vulnerability in zendframework and laminas-http allows an attacker to execute arbitrary code remotely. This vulnerability exists in the __destruct method of the Zend\Http\Response\Stream class in Stream.php. By exploiting this vulnerability, an attacker can control the content and execute malicious code on the target system. The impact of this vulnerability can be severe, as it allows unauthorized remote code execution, potentially leading to further compromise of the system and unauthorized access to sensitive data. The Common Vulnerability Scoring System (CVSS) score for this vulnerability is 9.8, indicating a critical severity level.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Conclusion
The deserialization vulnerability in zendframework and laminas-http poses a critical risk, allowing remote code execution. It is essential to update the affected packages to their fixed versions and regularly update all dependencies to mitigate the risk of known vulnerabilities. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for zendframework/zendframework →
FAQ
Zend Framework is a PHP framework that provides a collection of professional PHP packages for developing web applications and services.
Laminas HTTP is a component of the Laminas Project, which is a continuation of the Zend Framework. It provides HTTP-related functionality for PHP applications.
A deserialization vulnerability occurs when untrusted data is deserialized without proper validation and sanitization. This can lead to the execution of arbitrary code and potential remote code execution.
The impact of this vulnerability is severe, as it allows remote code execution. An attacker can exploit this vulnerability to execute arbitrary code on the target system, potentially leading to further compromise and unauthorized access to sensitive data.
To mitigate the risk of this vulnerability, it is crucial to update the affected packages to their fixed versions. Regularly updating and patching all dependencies is also recommended to address any known vulnerabilities.
References
Related vulnerabilities
Recent vulnerabilities recorded for zendframework/zendframework.