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

CVE-2026-56387: Apache bRPC RTMP AMF Parser DoS Vulnerability

CVE-2026-56387 is a denial of service flaw in Apache bRPC RTMP AMF parser that allows attackers to cause excessive memory allocation through malicious payloads. This post explains its impact, 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-56387 Overview

CVE-2026-56387 affects the Real-Time Messaging Protocol (RTMP) Action Message Format (AMF) parser in Apache bRPC. The parser accepts AMF string lengths and array counts directly from untrusted input without validation. A remote unauthenticated attacker who can reach a bRPC server with RTMP enabled can send a small AMF payload declaring an excessive long string length or array count. The server then allocates large amounts of memory before rejecting the incomplete payload, leading to resource exhaustion. The flaw maps to CWE-770: Allocation of Resources Without Limits or Throttling.

Critical Impact

Remote unauthenticated attackers can trigger excessive memory allocation on bRPC servers with RTMP enabled, resulting in denial of service.

Affected Products

  • Apache bRPC versions prior to 1.18.0
  • Deployments enabling the bRPC RTMP server component accepting untrusted traffic
  • Applications directly invoking the AMF parser on untrusted data

Discovery Timeline

  • 2026-10-21 - CVE-2026-56387 published to the National Vulnerability Database (NVD)
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-56387

Vulnerability Analysis

The vulnerability resides in the AMF deserialization logic used by the Apache bRPC RTMP server. AMF encodes complex objects as a stream of typed fields, including long strings prefixed by a 32-bit length and arrays prefixed by a 32-bit element count. The parser trusts these declared sizes and performs large allocations before confirming the stream actually contains the promised data.

An attacker sends a minimal RTMP message that declares a long string length approaching 4 GiB or an array containing millions of elements. The server resizes buffers or allocates containers to match the declared size. Memory pressure spikes immediately, and sustained requests exhaust available memory or trigger process termination.

The attack requires only network reachability to an RTMP-enabled bRPC endpoint. No authentication is needed, and the payload is small, making the imbalance between attacker cost and server cost significant.

Root Cause

The AMF long string parser resized its destination string to the declared 32-bit length before validating that the input stream contained the corresponding bytes. The ECMA array and strict array parsers also accepted 32-bit element counts without any configurable upper bound. No sanity limits constrained either the string size or the element count prior to allocation.

Attack Vector

The attack vector is network-based through the RTMP protocol handler. An attacker crafts an AMF payload with inflated length prefixes, opens an RTMP connection to the bRPC server, and transmits the message. The parser consumes the length field, allocates proportional memory, and only later detects the truncated payload. Repeating this request pattern across concurrent connections amplifies the impact. See the Apache mailing list advisory for the vendor description.

Detection Methods for CVE-2026-56387

Indicators of Compromise

  • Sudden memory growth in bRPC server processes correlated with inbound RTMP connections
  • Short-lived RTMP sessions terminating immediately after AMF handshake messages
  • OutOfMemory conditions or process restarts tied to RTMP listener threads
  • Repeated small inbound payloads to RTMP ports from the same source addresses

Detection Strategies

  • Instrument the AMF parser or wrap it with telemetry that logs declared string and array sizes above operational norms
  • Monitor memory allocation rates on bRPC worker processes and alert on deviations from baseline
  • Deploy network inspection on RTMP ports to flag AMF messages with length fields exceeding expected media payload sizes

Monitoring Recommendations

  • Track Resident Set Size (RSS) and heap growth per bRPC process with alerting thresholds
  • Correlate RTMP connection logs with process crash and restart events
  • Capture packet samples on RTMP listeners for forensic review of anomalous AMF headers

How to Mitigate CVE-2026-56387

Immediate Actions Required

  • Upgrade Apache bRPC to version 1.18.0 or later on all affected servers
  • Restrict network access to RTMP listeners so only trusted clients can reach them
  • Review application code that invokes the AMF parser directly on attacker-controlled data

Patch Information

The fix is included in Apache bRPC 1.18.0 and shipped via pull request #3353. The patch introduces configurable AMF parsing limits. The default maximum string size is 64 MiB and the default maximum array element count is 1,048,576. Payloads above these limits are rejected before allocation. Operators can adjust the thresholds using the amf_max_string_size and amf_max_array_size settings.

Workarounds

  • Disable the bRPC RTMP server component if it is not required
  • Place the RTMP listener behind a reverse proxy or firewall that enforces client allowlists
  • Apply per-connection resource quotas at the operating system level to limit single-process memory consumption
bash
# Configuration example: tune AMF parsing limits after upgrading to bRPC 1.18.0
--amf_max_string_size=67108864    # 64 MiB cap on AMF long strings
--amf_max_array_size=1048576      # 1,048,576 cap on AMF array elements

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.