CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-81876

CVE-2026-81876: Unauthenticated Denial of Service via Infinite Loop in HAPI FHIR SHCParser

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 18, 2026·6 min read·19 visits

Executive Summary (TL;DR)

An unauthenticated remote attacker can trigger an infinite loop in the JVM by submitting a malformed JSON Web Token representing a Smart Health Card. This loop pins the worker thread at 100% CPU, leading to potential complete application Denial of Service.

CVE-2026-81876 is a high-severity Denial of Service vulnerability in HAPI FHIR, a complete Java implementation of the HL7 FHIR standard. The vulnerability stems from improper usage of Java's java.util.zip.Inflater class within the Smart Health Card (SHC) parser.

Vulnerability Overview

The HAPI FHIR framework, a widely utilized Java-based implementation of the HL7 Fast Healthcare Interoperability Resources standard, is vulnerable to an unauthenticated Denial of Service (DoS) flaw. This vulnerability is tracked as CVE-2026-81876.

At the core of this vulnerability is the Smart Health Card (SHC) parser, implemented in SHCParser.java within the org.hl7.fhir.core ecosystem. Smart Health Cards are typically transferred as JSON Web Signatures (JWS) and can utilize compressed formats to reduce payload size. When processing these tokens, the framework attempts to decompress the nested payloads using Java's standard decompression APIs.

While the issue originates in the SHC-specific parsing module, the overall attack surface is significantly wider. Applications that do not explicitly process Smart Health Cards can still expose this vulnerability through automatic format detection features. Specifically, the framework utilizes ResourceChecker.java to dynamically determine the schema of arbitrary incoming data streams, routing them automatically through the vulnerable decompression logic if certain structural patterns are matched.

Root Cause Analysis

The root cause of CVE-2026-81876 lies in an unsafe processing loop within SHCParser.java during DEFLATE decompression. The parser leverages Java's native java.util.zip.Inflater class to process payloads indicating DEFLATE compression via the zip: DEF JWS header parameter.

The vulnerable implementation used a loop structured around the termination condition !inflater.finished(). However, the Java Development Kit (JDK) API contract for java.util.zip.Inflater specifies that finished() returns true only when the end of the compressed data stream is successfully reached. If the input stream is truncated, structurally incomplete, or empty, the decompression state machine cannot reach the official stream termination point.

Under these malformed conditions, invoking inflater.inflate(buffer) returns 0, indicating that zero bytes were processed. Because the stream did not terminate cleanly, finished() remains false, while needsInput() transitions to true to request more data. Since the code did not inspect the return value of inflate() or check needsInput(), the loop continues to execute indefinitely. This results in a CPU-bound infinite loop that pins the executing JVM thread at 100% capacity.

Code Analysis

The vulnerable decompression logic in HAPI FHIR was present in multiple locations within SHCParser.java. Specifically, both the public inflate method and the private decompress helper method contained identical vulnerable looping patterns.

The following code snippet illustrates the original implementation of the public inflate method:

// VULNERABLE CODE - SHCParser.java
public static byte[] inflate(byte[] data) throws IOException, DataFormatException {
  final Inflater inflater = new Inflater(true);
  inflater.setInput(data);
 
  try (final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length)) {
    byte[] buffer = new byte[BUFFER_SIZE];
    while (!inflater.finished()) {
      final int count = inflater.inflate(buffer);
      // Vulnerability: No check if count is 0 or if inflater has stalled
      outputStream.write(buffer, 0, count);
    }
    return outputStream.toByteArray();
  }
}

The fix, introduced in commits d804558bd77372b1629e55a5b901cad3f5134cdc and edd5d8c139e669e39270785f08be7b63aefef24c, introduces explicit validation checks on the return value of the inflate() call. When the returned byte count is zero, the code evaluates the state of the inflater to decide whether to abort the loop:

// PATCHED CODE - SHCParser.java
public static byte[] inflate(byte[] data) throws IOException, DataFormatException {
  final Inflater inflater = new Inflater(true);
  inflater.setInput(data);
 
  try (final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length)) {
    byte[] buffer = new byte[BUFFER_SIZE];
    while (!inflater.finished()) {
      final int count = inflater.inflate(buffer);
      if (count > 0) {
        outputStream.write(buffer, 0, count);
      } else {
        // Handle the 0 byte return condition
        if (inflater.needsInput()) {
          // Break out if no more input chunks are available
          break;
        }
        if (inflater.needsDictionary()) {
          // Break out if a preset dictionary is missing
          break;
        }
      }
    }
    return outputStream.toByteArray();
  }
}

This defensive pattern is robust against malformed or truncated payloads, preventing the infinite loop by exiting when the utility requires input that is not provided. However, the patch does not limit the maximum decompressed size. This omission means the parser remains potentially susceptible to decompression bombs (zip bombs) where a small, valid payload decompresses into an excessively large byte array, which could deplete JVM memory.

Exploitation Methodology

Exploitation of CVE-2026-81876 is highly practical and requires only network access to any open endpoint that processes FHIR data. Because of the behavior of automatic format detection, the attacker does not need to target an explicit Smart Health Card upload mechanism.

The conceptual attack path involves the following steps:

First, the attacker constructs a compact JWS token with a header containing the "zip": "DEF" attribute. The payload component of the token is intentionally left empty or truncated, so that it fails to provide the termination sequence required by the DEFLATE algorithm.

Second, the attacker transmits this token within an HTTP request to any endpoint utilizing ResourceChecker or direct FHIR parsers. Upon parsing, the application routes the token to SHCParser.inflate() or SHCParser.decompress() based on the header instruction.

Third, the decompression engine encounters the truncated input, fails to make progress, and enters the infinite loop. By executing a series of concurrent requests matching this structure, an attacker can consume all available threads in the JVM thread pool, inducing complete application Denial of Service.

Impact Assessment

The primary impact of CVE-2026-81876 is a complete Denial of Service of the hosting JVM. Because the infinite loop is entirely CPU-bound, a single thread spinning at 100% utilization consumes resources that are otherwise shared with legitimate application functions.

In standard application server configurations, thread pools manage incoming HTTP requests. If an attacker delivers multiple concurrent malformed JWS payloads, they can quickly exhaust the pool of active worker threads. Once the thread pool is fully occupied by infinite decompression loops, the application can no longer accept or process legitimate traffic, resulting in downtime.

From a scoring perspective, this vulnerability represents a severe threat despite not allowing remote code execution or data exposure. The lack of authentication requirements, coupled with low complexity and high exploit reliability, justifies the CVSS v3.1 score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Remediation and Detection Guidance

The most effective remediation is upgrading the core HAPI FHIR library. All deployments using the org.hl7.fhir.core family of libraries must upgrade to version 6.9.12 or later to eliminate the vulnerable decompression logic.

Where immediate updates are not feasible, network-level mitigations should be applied. Web Application Firewalls (WAF) can be configured to inspect incoming payloads for JSON Web Signature patterns containing the deflate parameter. Specifically, rules should block or alert on strings matching the "zip":\s*"DEF" pattern within HTTP request bodies.

Additionally, operations teams should monitor JVM performance metrics. A sudden, unexplained rise in CPU usage to 100% across multiple threads, combined with an increasing rate of HTTP request timeouts, serves as a strong indicator of an active exploitation attempt.

Fix Analysis (2)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.63%
Top 51% most exploited

Affected Systems

HAPI FHIR core library (org.hl7.fhir.core)

Affected Versions Detail

Product
Affected Versions
Fixed Version
org.hl7.fhir.core
hapifhir
< 6.9.126.9.12
AttributeDetail
CWE IDCWE-835 / CWE-400
Attack VectorNetwork (AV:N)
CVSS v3.1 Score7.5 (High)
EPSS Score0.0063
ImpactDenial of Service (DoS)
Exploit StatusTheoretical / Unproven
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-835
Loop with Unreachable Exit Condition ('Infinite Loop')

Loop with Unreachable Exit Condition ('Infinite Loop')

References & Sources

  • [1]GitHub Security Advisory GHSA-gq9c-wmrm-5hvr
  • [2]Fix Commit d804558b
  • [3]Fix Commit edd5d8c1
  • [4]Fix Pull Request #2493
  • [5]NVD Vulnerability Detail
  • [6]CVE Authority Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-118777
4.8

CVE-2026-118777: Prototype Pollution in Forge HTTP Client Cookie Management

CVE-2026-118777 is a prototype pollution vulnerability (CWE-1321) in the Forge JavaScript cryptography and networking library (distributed on npm as node-forge) prior to version 1.4.1. The flaw resides in the forge.http client subsystem, where incoming HTTP cookie names and paths parsed from Set-Cookie response headers are stored directly into standard JavaScript objects without key validation or property isolation. By returning crafted Set-Cookie headers containing keys such as __proto__ or constructor, a malicious HTTP server can inject arbitrary properties into Object.prototype, attach attributes to the global Object constructor, or delete built-in prototype methods to cause an application-wide denial of service.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-118775
3.7

CVE-2026-118775: ASN.1 OID First Arc Truncation and Ambiguity in node-forge

CVE-2026-118775 (GHSA-4642-5mcj-2rqw) is an integer overflow and validation flaw in the ASN.1 serialization module of Forge (node-forge) prior to version 1.4.1. The asn1.oidToDer() function fails to validate the range of the first two arcs of an Object Identifier (OID) and truncates the packed initial subidentifier to a single 8-bit integer. Applications that perform policy checks on untrusted OID strings before encoding them into Distinguished Encoding Rules (DER) format can be tricked into emitting DER bytes that correspond to a completely different, restricted OID.

Amit Schendel
Amit Schendel
10 views•10 min read
•1 day ago•CVE-2026-119194
7.5

CVE-2026-119194: Algorithmic Complexity Denial of Service in pyasn1 Schemaless ASN.1 Decoder

CVE-2026-119194 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting versions 0.3.3 through 0.6.4. The flaw resides in the schemaless decoding routine ConstructedPayloadDecoderBase._decodeComponentsSchemaless used across BER, CER, and DER codecs. By sending an ASN.1 container populated with child components whose tag identifiers are separated by multiples of CPython's integer hash modulus (sys.hash_info.modulus), an unauthenticated attacker can force worst-case hash collisions in an unbounded Python set, degrading decoding performance from O(N) to O(N^2) and causing a Denial of Service (DoS).

Alon Barad
Alon Barad
8 views•9 min read
•1 day ago•CVE-2026-119195
7.5

CVE-2026-119195: Quadratic-Time Denial of Service in pyasn1 BER/CER/DER Decoders

CVE-2026-119195 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting all versions prior to 0.6.5. When decoding constructed strings or indefinite-length ANY types across BER, CER, and certain DER code paths, the payload decoders repeatedly concatenate incoming fragments onto an immutable bytes object using the += operator. Because Python bytes objects cannot be resized in-place, each fragment iteration allocates a new buffer and copies all previously accumulated bytes, resulting in quadratic O(N^2) time and memory copy complexity. An unauthenticated remote attacker can supply a highly fragmented ASN.1 stream to exhaust CPU cycles and stall application worker threads.

Amit Schendel
Amit Schendel
9 views•10 min read
•1 day ago•CVE-2026-119197
7.5

CVE-2026-119197: Quadratic Algorithmic Complexity Denial of Service in pyasn1 REAL Mantissa Decoder

An algorithmic complexity vulnerability (CWE-407) in pyasn1 versions prior to 0.6.5 allows unauthenticated attackers to cause a Denial of Service (DoS) via crafted ASN.1 payloads. The flaw resides in the binary-encoded ASN.1 REAL mantissa deserialization routine within RealPayloadDecoder.valueDecoder. By performing iterative byte-string slicing and repeated bitwise shifts on a growing arbitrary-precision integer, the decoder exhibits quadratic time and memory allocation complexity relative to the mantissa length. Supplying a BER-, CER-, or DER-encoded payload with a large REAL mantissa causes excessive CPU consumption and blocks application worker processes.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-119196
7.5

CVE-2026-119196: Quadratic CPU Consumption in pyasn1 Constructed BIT STRING Decoding

A vulnerability classified under CWE-407 (Inefficient Algorithmic Complexity) exists in the pyasn1 library prior to version 0.6.5. When parsing constructed ASN.1 BIT STRING payloads under BER, CER, or schema-driven DER encoding rules, the BitStringPayloadDecoder repeatedly shifts and copies the entire accumulated bit value for each incoming fragment. Processing inputs with a large number of small constructed fragments induces quadratic CPU consumption, allowing unauthenticated remote attackers to cause a denial of service via resource exhaustion during the initial decoding phase.

Alon Barad
Alon Barad
9 views•10 min read