Skip to main content
Vulnerability Database/CVE-2026-91137

CVE-2026-91137: Apache Thrift PHP Bindings DOS Vulnerability

CVE-2026-91137 is a denial of service vulnerability in Apache Thrift PHP bindings caused by improper input validation and resource allocation issues. This post explains its technical details, affected versions, and mitigation steps.

Published:

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-91137 Overview

CVE-2026-91137 is a resource exhaustion vulnerability in the Apache Thrift PHP bindings. The flaw stems from improper validation of specified quantity in input, allocation of resources without limits or throttling, and excessive iteration during deserialization. Remote attackers can send crafted Thrift messages that force the PHP binding to allocate memory or iterate based on attacker-controlled size fields. The issue affects Apache Thrift versions before 0.25.0 and is tracked under [CWE-770: Allocation of Resources Without Limits or Throttling]. The Apache Thrift project has released version 0.25.0 to address the vulnerability.

Critical Impact

Unauthenticated remote attackers can trigger memory and CPU exhaustion in services using Apache Thrift PHP bindings, causing denial of service against the host application.

Affected Products

  • Apache Thrift PHP bindings, all versions prior to 0.25.0
  • PHP applications and services consuming untrusted Thrift payloads via the official PHP library
  • Downstream frameworks and microservices embedding the vulnerable Thrift PHP client or server

Discovery Timeline

  • 2026-10-02 - CVE-2026-91137 published to NVD
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-91137

Vulnerability Analysis

Apache Thrift is a cross-language serialization and remote procedure call (RPC) framework. The PHP bindings implement protocol readers that parse length-prefixed collections such as lists, sets, maps, and strings. The vulnerable code paths read a size field from the wire and then allocate structures or iterate that many times without validating the value against the actual bytes remaining in the input buffer.

An attacker can send a short message that declares a very large element count. The PHP binding then attempts to allocate memory or loop up to the declared size, consuming CPU and memory until the PHP process hits its memory limit or request timeout. Services exposing a Thrift endpoint over HTTP, TCP, or a message queue are reachable without authentication in many deployments.

Root Cause

The root cause is missing bounds enforcement during deserialization. The PHP binding trusts the size prefix supplied by the peer. There is no cross-check against the remaining input length and no configurable upper bound on container cardinality. This matches the [CWE-770] pattern of allocating resources without throttling.

Attack Vector

Exploitation requires only network access to a service that deserializes Thrift input using the PHP binding. No authentication, user interaction, or prior privileges are required. The attacker crafts a Thrift payload whose container or string length field encodes a very large value. On receipt, the PHP process allocates memory or spins in a read loop, degrading or halting service for legitimate clients. Repeated requests amplify the impact into a sustained denial of service.

No verified public exploit code is available at the time of writing. Technical discussion is published on the Apache developer mailing list: Apache Mailing List Discussion and Apache Mailing List Thread.

Detection Methods for CVE-2026-91137

Indicators of Compromise

  • PHP worker processes terminating with Allowed memory size exhausted errors tied to Thrift deserialization frames.
  • Sudden spikes in request latency or CPU on PHP-FPM pools that host Thrift endpoints.
  • Inbound Thrift messages with container or string length fields that are disproportionate to the TCP payload size.

Detection Strategies

  • Inspect application logs for repeated fatal errors originating in TBinaryProtocol, TCompactProtocol, or related reader classes in the Thrift PHP library.
  • Deploy network rules that flag Thrift frames where a declared collection length exceeds a reasonable application-specific maximum.
  • Inventory PHP dependencies and alert on any apache/thrift package version below 0.25.0.

Monitoring Recommendations

  • Track memory and CPU usage per PHP-FPM worker and alert on sustained saturation correlated with Thrift traffic.
  • Monitor rate and size distribution of inbound RPC calls on Thrift listeners to detect abnormal patterns from single sources.
  • Correlate web and RPC gateway logs with endpoint telemetry to identify hosts repeatedly killed by the out-of-memory killer.

How to Mitigate CVE-2026-91137

Immediate Actions Required

  • Upgrade Apache Thrift PHP bindings to version 0.25.0 or later across all production and staging environments.
  • Place Thrift endpoints behind authenticated gateways or network allow-lists where feasible to reduce exposure.
  • Enforce strict PHP memory_limit and request timeout values on workers that process Thrift input to contain blast radius.

Patch Information

Apache Thrift version 0.25.0 fixes the issue. Upgrade the apache/thrift dependency, redeploy affected PHP services, and restart PHP-FPM or CLI workers so the patched library is loaded. Review downstream frameworks that vendor the Thrift PHP sources and update them in lockstep.

Workarounds

  • Terminate Thrift traffic at a reverse proxy that enforces maximum request body size to cap the attack surface.
  • Rate-limit RPC calls per client IP and per authenticated identity on the ingress layer.
  • Where possible, require mutual TLS or application-layer authentication before accepting Thrift payloads.
bash
# Configuration example: enforce dependency upgrade via Composer
composer require apache/thrift:^0.25.0
composer update apache/thrift
php -r "echo Thrift\\Package::VERSION;"

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

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.