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·22 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

•30 minutes ago•CVE-2026-128068
5.3

CVE-2026-128068: Regular Expression Denial of Service in rails-html-sanitizer

CVE-2026-128068 (GHSA-cpgf-5mjf-73p7) is a Regular Expression Denial of Service (ReDoS) vulnerability in the rails-html-sanitizer Ruby gem affecting versions 1.0.3 through 1.7.1. The flaw resides in the Rails::HTML::PermitScrubber#scrub_attribute method, which uses the multiline regular expression /^\s*[^#\s].*/m to enforce local-only URI fragment references on SVG elements. On Ruby runtimes prior to version 3.2 (CRuby <= 3.1 and JRuby), evaluating an attribute value composed of repeated newline and whitespace characters without a hash character triggers quadratic backtracking O(n^2). Applications are only vulnerable if their sanitization allowlist is explicitly configured to permit SVG reference elements such as <use> alongside href or xlink:href attributes.

Alon Barad
Alon Barad
2 views•9 min read
•about 2 hours ago•CVE-2026-126360
5.3

CVE-2026-126360: Regular Expression Denial of Service in OpenTelemetry Python opentelemetry-api

CVE-2026-126360 (GHSA-mf5v-w3w3-f6cg) is an algorithmic complexity vulnerability (Regular Expression Denial of Service) in the trace context propagation logic of the opentelemetry-api package within the OpenTelemetry Python ecosystem. In versions prior to 1.45.2, the TraceContextTextMapPropagator.extract() method utilizes a regular expression susceptible to quadratic-time backtracking when parsing malformed W3C traceparent headers containing long sequences of whitespace followed by an embedded newline character. In Python applications—particularly those using single-threaded asynchronous event loops—an unauthenticated remote attacker transmitting payloads over newline-preserving carriers can monopolize CPU execution and induce application-level Denial of Service.

Alon Barad
Alon Barad
2 views•10 min read
•about 3 hours ago•CVE-2026-126359
3.4

CVE-2026-126359: Cross-Site Scripting via Split Closing Style Tag in Hono CSS Helper

CVE-2026-126359 (GHSA-3gg2-335m-rxc6) is an improper input neutralization vulnerability (CWE-79) in the Hono web framework (`honojs/hono`). Versions from 3.12.0 prior to 4.13.16 evaluate and escape interpolated strings in the `hono/css` helper individually before concatenating template chunks and stripping CSS comments. When a `<` character and a `/style>` sequence are split across template boundaries, adjacent interpolations, or separated by a CSS comment, the sanitizer fails to escape the closing tag sequence. During Server-Side Rendering (SSR), the `<Style />` component outputs an unescaped `</style>` delimiter, permitting an attacker to break out of the CSS raw text context and execute arbitrary HTML and JavaScript in the victim's browser.

Alon Barad
Alon Barad
4 views•10 min read
•about 4 hours ago•CVE-2026-126358
5.3

CVE-2026-126358: Authorization Bypass via Wildcard Middleware Omission in Hono RegExpRouter

An incorrect authorization vulnerability (CWE-863) exists in the Hono web application framework (npm package `hono`) from version 4.1.4 prior to 4.13.16. Flaws in the registration-time coverage calculation and regular expression compilation within `RegExpRouter` cause wildcard middleware to be omitted under three specific routing conditions: parameter pattern equivalence mismatches, wildcard boundary collisions, and request paths containing percent-encoded line terminators. Because Hono's default `SmartRouter` selects `RegExpRouter` for most standard web applications, unauthenticated remote clients can bypass authentication, authorization, or security middleware registered on wildcard paths to directly access protected route handlers or the application's not-found handler.

Alon Barad
Alon Barad
5 views•13 min read
•about 5 hours ago•CVE-2026-126357
5.3

CVE-2026-126357: Authentication Bypass via Mount Path Transformation in Hono

CVE-2026-126357 (GHSA-4m76-xfj5-7975) is an authentication bypass vulnerability in the Hono web application framework prior to version 4.13.16. The flaw resides in the prefix-stripping and URL reconstruction logic of `app.mount()` and the `mount()` middleware. Two distinct path transformation errors—static route-pattern length slicing on dynamic prefixes and URL normalization of decoded pathnames—create a routing discrepancy between the outer Hono router and the mounted sub-application. An unauthenticated attacker can exploit these discrepancies to bypass outer authentication or authorization middleware and access protected inner routes directly.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 6 hours ago•CVE-2026-126356
5.3

CVE-2026-126356: Multipart Form Validation Bypass in Hono Web Framework

A parser differential vulnerability exists in the Hono web application framework versions 4.5.1 prior to 4.13.16. The built-in form validation middleware (`validator('form')`) utilizes an overly restrictive regular expression to evaluate the HTTP `Content-Type` header for `multipart/form-data` payloads. When a client supplies additional valid MIME parameters (such as `charset=utf-8`) or multiple whitespace characters following a semicolon delimiter, the regular expression fails to match. Consequently, the validator passes an empty object to the validation callback instead of the parsed form fields. If the validation logic permits empty objects or only checks for disallowed values on optional properties, the request passes validation, allowing downstream route handlers calling `c.req.parseBody()` or `c.req.formData()` to process unvalidated user input.

Amit Schendel
Amit Schendel
5 views•10 min read