The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-21704

CVE-2021-21704: PHP Firebird PDO Driver DoS Vulnerability

CVE-2021-21704 is a denial of service flaw in PHP's Firebird PDO driver that allows malicious database servers to cause crashes and memory corruption. This article covers technical details, affected versions, and mitigations.

Published: February 25, 2026

CVE-2021-21704 Overview

CVE-2021-21704 is a memory corruption vulnerability affecting the PHP Firebird PDO driver extension. When PHP applications connect to a malicious Firebird database server, the server can return invalid response data that is not properly parsed by the driver. This improper handling can trigger crashes in various database functions including getAttribute(), execute(), fetch(), and others, resulting in denial of service or potentially memory corruption.

The vulnerability stems from insufficient validation of database server responses, classified under CWE-125 (Out-of-Bounds Read) and CWE-787 (Out-of-Bounds Write), indicating that the driver may read or write data outside allocated memory boundaries when processing malformed server responses.

Critical Impact

A malicious Firebird database server can cause application crashes, denial of service, or potentially exploit memory corruption to compromise PHP applications using the vulnerable PDO driver.

Affected Products

  • PHP versions 7.3.x below 7.3.29
  • PHP versions 7.4.x below 7.4.21
  • PHP versions 8.0.x below 8.0.8
  • NetApp Clustered Data ONTAP

Discovery Timeline

  • 2021-10-04 - CVE-2021-21704 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-21704

Vulnerability Analysis

The vulnerability exists in the PHP Firebird PDO driver's response parsing logic. When processing data returned from a Firebird database server, the driver fails to adequately validate the integrity and format of the response before attempting to parse it. This lack of proper input validation creates conditions where malformed data can cause out-of-bounds memory access.

The issue affects multiple database interaction functions within the PDO Firebird extension. Functions such as getAttribute(), execute(), and fetch() all rely on the underlying response parsing mechanism, making them all potential vectors for triggering the vulnerability. When exploited, these conditions can lead to crashes (denial of service) or potentially memory corruption that could be leveraged for further attacks.

Root Cause

The root cause is improper input validation when parsing database server responses in the PHP Firebird PDO driver. The driver does not sufficiently verify that response data conforms to expected formats and sizes before processing, allowing out-of-bounds read (CWE-125) and out-of-bounds write (CWE-787) conditions to occur. Multiple related issues were identified and tracked in PHP bug reports #76448, #76449, #76450, and #76452.

Attack Vector

The attack requires a network-accessible malicious Firebird database server that a vulnerable PHP application connects to. The attacker must control or compromise a database server that the target application trusts and communicates with. When the PHP application executes database operations, the malicious server responds with crafted invalid data designed to trigger the parsing vulnerabilities.

While the attack complexity is high due to the requirement of controlling a database server that the target application connects to, no privileges or user interaction are required once the malicious server is in position. The vulnerability does not affect confidentiality or integrity directly but has a high impact on availability through denial of service.

The attack scenario involves configuring a malicious Firebird database server to return specially crafted responses that exploit the parsing weaknesses. When the victim PHP application connects and performs database operations like executing queries or fetching results, the malformed responses trigger out-of-bounds memory access, causing the application to crash.

Detection Methods for CVE-2021-21704

Indicators of Compromise

  • Unexpected crashes or segmentation faults in PHP processes using PDO Firebird connections
  • PHP error logs showing memory access violations during database operations
  • Abnormal process terminations when executing getAttribute(), execute(), or fetch() PDO functions
  • Core dumps indicating memory corruption in PDO Firebird driver code paths

Detection Strategies

  • Monitor PHP application logs for recurring crashes or unexpected terminations related to Firebird database operations
  • Implement application-level monitoring to detect repeated PDO connection failures or function call exceptions
  • Use process monitoring to identify PHP worker processes experiencing abnormal termination patterns
  • Deploy network monitoring to detect suspicious or malformed Firebird protocol traffic

Monitoring Recommendations

  • Enable detailed PHP error logging for PDO operations to capture crash diagnostics
  • Configure application performance monitoring to alert on elevated error rates in database-related code
  • Implement health checks that verify Firebird database connectivity and response integrity
  • Monitor system logs for segmentation faults or memory-related errors in PHP processes

How to Mitigate CVE-2021-21704

Immediate Actions Required

  • Upgrade PHP to version 7.3.29 or later for the 7.3.x branch
  • Upgrade PHP to version 7.4.21 or later for the 7.4.x branch
  • Upgrade PHP to version 8.0.8 or later for the 8.0.x branch
  • Review and validate the trustworthiness of all Firebird database servers that PHP applications connect to

Patch Information

Security patches addressing this vulnerability were released by PHP in versions 7.3.29, 7.4.21, and 8.0.8. The patches improve validation of database server responses in the Firebird PDO driver to prevent out-of-bounds memory access.

For detailed information about the underlying issues, refer to the PHP bug reports:

  • PHP Bug Report #76448
  • PHP Bug Report #76449
  • PHP Bug Report #76450
  • PHP Bug Report #76452

Additional vendor advisories are available from Gentoo GLSA 202209-20 and NetApp Security Advisory ntap-20211029-0006.

Workarounds

  • Disable the PDO Firebird extension if not required by removing or commenting out the extension directive in php.ini
  • Implement network-level controls to restrict PHP application connections to known trusted Firebird database servers only
  • Consider using alternative database drivers or database systems if Firebird is not strictly required
  • Deploy PHP applications in isolated environments to limit the impact of potential crashes or exploitation
bash
# Disable PDO Firebird extension in php.ini
# Comment out or remove the following line:
# extension=pdo_firebird

# Verify the extension is disabled
php -m | grep -i firebird

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPhp

  • SeverityMEDIUM

  • CVSS Score5.9

  • EPSS Probability0.14%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-125

  • CWE-787
  • Technical References
  • Gentoo GLSA 202209-20

  • NetApp Security Advisory ntap-20211029-0006
  • Vendor Resources
  • PHP Bug Report #76448

  • PHP Bug Report #76449

  • PHP Bug Report #76450

  • PHP Bug Report #76452
  • Related CVEs
  • CVE-2025-14180: PHP PDO PostgreSQL DoS Vulnerability

  • CVE-2025-6491: PHP SOAP Extension DoS Vulnerability

  • CVE-2025-1735: PHP pgsql/pdo_pgsql DOS Vulnerability

  • CVE-2024-2757: PHP mb_encode_mimeheader DoS 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