Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-3007

CVE-2021-3007: Laminas-http RCE Vulnerability

CVE-2021-3007 is a deserialization remote code execution vulnerability in Getlaminas Laminas-http that allows attackers to execute arbitrary code. This article covers technical details, affected versions, and mitigation.

Published: March 4, 2026

CVE-2021-3007 Overview

CVE-2021-3007 is a critical insecure deserialization vulnerability affecting Laminas Project laminas-http before version 2.14.2 and Zend Framework 3.0.0. The vulnerability exists in the __destruct method of the Zend\Http\Response\Stream class within Stream.php. When attacker-controlled content can be deserialized, this flaw can be exploited to achieve remote code execution (RCE). Notably, Zend Framework is no longer supported by the maintainer, and while the laminas-http vendor considers this a "vulnerability in the PHP language itself," type checking mitigations have been implemented to prevent exploitation in unrecommended use cases where attacker-supplied data can be deserialized.

Critical Impact

This deserialization vulnerability enables remote code execution when attackers can control deserialized content, potentially leading to complete system compromise. The vulnerability has been observed being leveraged in botnet campaigns.

Affected Products

  • Getlaminas laminas-http versions prior to 2.14.2
  • Zend Framework version 3.0.0

Discovery Timeline

  • 2021-01-04 - CVE-2021-3007 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-3007

Vulnerability Analysis

This insecure deserialization vulnerability exists in the Zend\Http\Response\Stream class, specifically within its __destruct magic method. PHP's deserialization mechanism automatically invokes magic methods such as __destruct when objects are unserialized. In vulnerable versions, the __destruct method in Stream.php performs file operations based on object properties that can be manipulated through crafted serialized data.

When an application deserializes user-controlled input containing a malicious Zend\Http\Response\Stream object, the attacker can control properties that determine file system operations. This can be chained with other techniques to achieve arbitrary code execution on the target system. The vulnerability follows a classic PHP object injection pattern where magic methods become gadgets in an exploitation chain.

According to Check Point research, this vulnerability has been actively leveraged in botnet campaigns, demonstrating real-world exploitation.

Root Cause

The root cause lies in the unsafe handling of object properties within the __destruct method of the Stream class. When a serialized object is deserialized, the destructor executes operations that trust object property values without proper type validation. This allows an attacker to inject malicious property values that, when processed during object destruction, lead to unintended code execution or file system manipulation. The fix implemented in version 2.14.2 adds type checking to validate property values before they are used in sensitive operations.

Attack Vector

The attack vector is network-based, requiring no privileges or user interaction. An attacker must identify an application endpoint that deserializes user-supplied input and processes it using the vulnerable laminas-http or Zend Framework components. The exploitation flow involves:

  1. Crafting a malicious serialized PHP object containing a Zend\Http\Response\Stream instance with manipulated properties
  2. Submitting the payload to an application endpoint that performs deserialization
  3. The PHP runtime automatically invokes the __destruct method when the object is destroyed
  4. Malicious property values trigger unintended operations leading to code execution

The vulnerability mechanism involves object property manipulation during deserialization. When the destructor runs, it processes the streamName property in file operations. Technical details and exploitation techniques are documented in the GitHub RCE Exploit Document. The fix involves adding strict type checking to prevent arbitrary values from being processed.

Detection Methods for CVE-2021-3007

Indicators of Compromise

  • Unexpected serialized PHP data containing Zend\Http\Response\Stream class references in HTTP requests
  • Suspicious file operations or new files created in web-accessible directories
  • Unusual network traffic patterns indicating botnet command and control communications
  • Web application logs showing malformed or unusually large serialized payloads

Detection Strategies

  • Monitor web application logs for requests containing serialized PHP objects (base64-encoded O: patterns)
  • Deploy web application firewall rules to detect and block PHP serialized object payloads
  • Implement file integrity monitoring on application directories to detect unauthorized file creation
  • Review application code for unserialize() calls processing user-controlled input

Monitoring Recommendations

  • Enable verbose logging for PHP applications to capture deserialization events
  • Configure SIEM rules to alert on suspicious patterns matching PHP object injection attempts
  • Monitor for outbound connections to known botnet infrastructure associated with CVE-2021-3007 exploitation
  • Regularly scan application dependencies to identify vulnerable laminas-http or Zend Framework versions

How to Mitigate CVE-2021-3007

Immediate Actions Required

  • Upgrade laminas-http to version 2.14.2 or later immediately
  • Audit applications using Zend Framework 3.0.0 for deserialization of user input
  • Migrate away from Zend Framework to actively maintained alternatives as it is no longer supported
  • Implement input validation to reject serialized PHP objects from untrusted sources

Patch Information

The vulnerability has been addressed in laminas-http version 2.14.2, which implements type checking to prevent exploitation. Review the Laminas HTTP Release Notes for details on the security fix. The patch adds validation to ensure property values are of expected types before they are used in sensitive operations. For technical details on the changes, refer to the Laminas HTTP Pull Request and commit history.

Workarounds

  • Avoid deserializing user-controlled data entirely; use JSON or other safe formats instead
  • If deserialization is required, implement allow-lists of permitted classes using PHP's allowed_classes option
  • Deploy web application firewalls to filter requests containing serialized PHP objects
  • Isolate applications using vulnerable components in network segments with restricted outbound access
bash
# Update laminas-http using Composer
composer require laminas/laminas-http:^2.14.2

# Verify installed version
composer show laminas/laminas-http | grep versions

# Search for unserialize usage in codebase
grep -r "unserialize" --include="*.php" /path/to/application

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechLaminas Http

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability90.27%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-502
  • Technical References
  • GitHub RCE Exploit Document

  • Laminas HTTP Release Notes

  • Check Point Botnet Analysis
  • Vendor Resources
  • Laminas HTTP Commit Changes

  • Laminas HTTP Pull Request
  • Latest CVEs
  • CVE-2025-52793: Esselink.nu Settings CSRF Vulnerability

  • CVE-2025-52772: Virtual Moderator CSRF Vulnerability

  • CVE-2025-48279: WC MyParcel Belgium XSS Vulnerability

  • CVE-2025-39381: KiotViet Sync CSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English