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-2025-14178

CVE-2025-14178: PHP Buffer Overflow Vulnerability

CVE-2025-14178 is a heap buffer overflow vulnerability in PHP's array_merge() function affecting versions 8.1-8.5. This flaw can lead to memory corruption and crashes. Discover the technical details, affected versions, and mitigation.

Published: April 14, 2026

CVE-2025-14178 Overview

CVE-2025-14178 is a heap buffer overflow vulnerability affecting multiple versions of PHP. The vulnerability exists in the array_merge() function where a heap buffer overflow occurs when the total element count of packed arrays exceeds 32-bit limits or HT_MAX_SIZE. This is caused by an integer overflow in the precomputation of element counts using zend_hash_num_elements(). Successful exploitation may lead to memory corruption or crashes, affecting the integrity and availability of PHP-powered web servers and applications.

Critical Impact

This vulnerability can result in memory corruption or denial of service conditions on PHP servers, potentially affecting web application availability and data integrity for any system running vulnerable PHP versions.

Affected Products

  • PHP 8.1.* before 8.1.34
  • PHP 8.2.* before 8.2.30
  • PHP 8.3.* before 8.3.29
  • PHP 8.4.* before 8.4.16
  • PHP 8.5.* before 8.5.1

Discovery Timeline

  • 2025-12-27 - CVE-2025-14178 published to NVD
  • 2026-01-24 - Last updated in NVD database

Technical Details for CVE-2025-14178

Vulnerability Analysis

This vulnerability stems from improper handling of large array sizes within PHP's array_merge() function. When merging multiple packed arrays, PHP precomputes the total number of elements that will be present in the resulting merged array using the zend_hash_num_elements() function. However, when the combined element count approaches or exceeds the maximum value representable by a 32-bit integer or the internal HT_MAX_SIZE constant, an integer overflow condition occurs.

The integer overflow causes the allocated memory buffer to be significantly smaller than required to hold all the merged elements. As the merge operation proceeds and attempts to write beyond the undersized buffer, a heap buffer overflow condition is triggered. This can corrupt adjacent heap memory structures, leading to unpredictable behavior including crashes, memory corruption, and potential exploitation scenarios.

Root Cause

The root cause is an integer overflow vulnerability (CWE-190) in the element count calculation logic within array_merge(). The function uses zend_hash_num_elements() to determine the size of the destination array but fails to properly validate that the cumulative count remains within safe bounds before memory allocation. When the sum of elements from multiple input arrays wraps around due to integer overflow, an insufficient buffer is allocated, resulting in subsequent heap memory corruption during the merge operation.

Attack Vector

The attack vector for this vulnerability is network-based, requiring no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Sending specially crafted HTTP requests to a PHP application that processes user-controlled array data
  2. Providing multiple large arrays to an endpoint that uses array_merge() to combine them
  3. Triggering the integer overflow condition by ensuring the total element count exceeds safe limits
  4. Causing the heap buffer overflow to corrupt memory, potentially leading to denial of service or, in some scenarios, arbitrary code execution

The vulnerability is particularly concerning for web applications that accept and merge array data from untrusted sources, such as form submissions, API endpoints, or file uploads containing serialized array data.

Detection Methods for CVE-2025-14178

Indicators of Compromise

  • Unexpected PHP process crashes or segmentation faults in application logs
  • Memory corruption errors or heap-related crashes in PHP error logs
  • Abnormal memory usage patterns in PHP-FPM or Apache mod_php processes
  • Application behavior anomalies following processing of large array data

Detection Strategies

  • Monitor PHP error logs for segmentation faults, memory allocation failures, or unexpected crashes related to array operations
  • Implement web application firewall rules to detect and block requests with unusually large or numerous array parameters
  • Use runtime application self-protection (RASP) solutions to monitor for heap corruption attempts
  • Deploy SentinelOne Singularity to detect memory corruption exploitation attempts and anomalous process behavior

Monitoring Recommendations

  • Enable verbose PHP error logging and centralize logs for analysis
  • Implement monitoring alerts for PHP process crashes and restarts
  • Monitor system memory usage for abnormal spikes during request processing
  • Track application response times for degradation that may indicate exploitation attempts

How to Mitigate CVE-2025-14178

Immediate Actions Required

  • Upgrade PHP to a patched version immediately: 8.1.34, 8.2.30, 8.3.29, 8.4.16, or 8.5.1
  • Review application code for uses of array_merge() with user-controlled input and implement input validation
  • Deploy web application firewall rules to limit array sizes in incoming requests
  • Consider implementing rate limiting on endpoints that process array data

Patch Information

PHP has released security patches addressing this vulnerability across all affected version branches. Organizations should upgrade to the following minimum versions:

PHP BranchMinimum Safe Version
8.1.x8.1.34
8.2.x8.2.30
8.3.x8.3.29
8.4.x8.4.16
8.5.x8.5.1

For detailed patch information, refer to the PHP Security Advisory on GitHub. Debian users should also review the Debian LTS Security Announcement for distribution-specific guidance.

Workarounds

  • Implement strict input validation to limit the size and number of arrays accepted from user input before passing to array_merge()
  • Use PHP's memory_limit configuration directive to constrain maximum memory allocation per request
  • Deploy a web application firewall to filter requests containing excessively large array parameters
  • Consider implementing application-level checks to validate total element counts before merging arrays
bash
# PHP configuration hardening example
# Add to php.ini or php-fpm pool configuration

# Limit maximum memory per request to reduce impact of exploitation
memory_limit = 128M

# Limit maximum input variables (helps constrain array sizes)
max_input_vars = 1000

# Set maximum POST data size
post_max_size = 8M

# Limit input nesting depth
max_input_nesting_level = 64

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechPhp

  • SeverityHIGH

  • CVSS Score8.2

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-190
  • Technical References
  • Debian LTS Announcement
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2024-8932: PHP ldap_escape() Buffer Overflow Flaw

  • CVE-2024-11236: PHP ldap_escape() Buffer Overflow Flaw

  • CVE-2024-11233: PHP Buffer Overflow Vulnerability

  • CVE-2023-3824: PHP PHAR Buffer Overflow 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