AddCVE-2021-3007 - Laminas/Zend Framework Insecure Deserialization #14247
+84
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/attempt #14236
PR Information
Template validation
Additional Details
Vulnerability Summary:
Laminas Project laminas-http before 2.14.2 and Zend Framework 3.0.0 contain an insecure deserialization vulnerability in the
__destructmethod ofZend\Http\Response\Stream. Exploitation requires an application endpoint that callsunserialize()on attacker-controlled data.Gadget Chain:
Zend\Http\Response\Stream(25 chars)streamName(protected),stream(protected),cleanup(protected)unlink(), chainable with other gadgets for RCEDebug Output (True Positive):
Vulnerable Environment:
Docker environment included in
CVE-2021-3007-docker/folder for validation:cd http/cves/2021/CVE-2021-3007-docker docker-compose up -d nuclei -t ../CVE-2021-3007.yaml -u http://localhost:8080 -debugShodan Query:
http.component:"Zend Framework"Fofa Query:
app="Zend-Framework"Notes
This CVE is a library-level vulnerability that requires:
unserialize()on user-controlled inputThe template demonstrates successful deserialization of the
Zend\Http\Response\Streamgadget class, confirming the vulnerability exists. The gadget chain enables arbitrary file deletion and can be combined with other gadgets for RCE depending on available classes in the application.This vulnerability was actively exploited in the wild by the FreakOut botnet (January 2021).