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



GHSA-XF7X-X43H-RPQH

GHSA-xf7x-x43h-rpqh: Denial of Service via Unconstrained Circular Reference Resolution in json-repair

Alon Barad
Alon Barad
Software Engineer

Jul 14, 2026·5 min read·12 visits

Executive Summary (TL;DR)

Unauthenticated remote attackers can cause denial of service (100 percent CPU exhaustion) by submitting circular JSON Schema references to the json-repair parser.

A Denial of Service vulnerability exists in the json-repair Python library due to an unconstrained loop during JSON Schema reference resolution. By submitting a circular JSON Schema, an attacker can trigger infinite recursion, causing 100 percent CPU exhaustion. Because this package is heavily utilized in LLM data-processing pipelines, this flaw presents a substantial threat to application availability.

Vulnerability Overview

The json-repair Python package is a utility designed to parse and repair malformed JSON structures, which is frequently integrated into workflows that process outputs from Large Language Models (LLMs). The library includes a schema-aware parser designed to correct structural JSON issues based on a provided JSON Schema definition. The vulnerability exists within the schema reference ($ref) resolution mechanism of this component.

An attacker can trigger a Denial of Service (DoS) condition by providing a maliciously crafted, circular JSON Schema containing self-referencing pointers. When the parser attempts to resolve these cyclic references, it enters an infinite loop, consuming a single CPU core entirely. This technical analysis explores the mechanics of this flaw, its exploitability, and the official mitigation strategies.

Because json-repair is commonly deployed to sanitize untrusted output in automated parsing pipelines, exposing the loads() interface to user-controlled schemas provides an immediate attack path. Remote, unauthenticated attackers can leverage this behavior to systematically exhaust host processor resources with minimal network overhead.

Root Cause Analysis

The flaw is located in the $ref resolution engine of the schema-aware JSON repair utility, implemented in src/json_repair/schema_repair.py within the SchemaRepairer class. When a JSON Schema containing a $ref key is processed, the SchemaRepairer.resolve_schema() method initiates a while loop designed to sequentially resolve pointers until no more references exist.

The logic evaluates the statement while "$ref" in schema_dict and delegates resolution to the helper function _resolve_ref(). This helper function parses the pointer and returns the corresponding sub-schema relative to the root_schema object, which represents the initial user-provided schema. If the schema contains self-referential definitions (such as node a pointing to node a or a circular chain a -> b -> a), the returned resolved structure continually contains the same $ref key.

Because the resolution engine lacked cycle tracking or recursion depth limits, the loop condition remains satisfied indefinitely. This design flaw allows an unauthenticated actor to force the thread of execution into an infinite loop, resulting in 100 percent CPU utilization on the executing core.

Code Analysis

The vulnerable implementation of the reference resolver in src/json_repair/schema_repair.py demonstrates the lack of traversal state preservation. In the unpatched codebase, the loop simply assigns the output of _resolve_ref back to schema_dict without any historical tracking:

# Vulnerable implementation in src/json_repair/schema_repair.py
schema_dict = cast("dict[str, Any]", schema)
while "$ref" in schema_dict:
    ref = schema_dict["$ref"]
    resolved = self._resolve_ref(ref)
    if isinstance(resolved, bool):
        return resolved
    schema_dict = resolved

The patched version introduces cycle tracking using unique Python object identifiers. By tracking the id() of each traversed schema dictionary, the engine detects when a node is revisited within the current path:

# Patched implementation in src/json_repair/schema_repair.py
schema_dict = cast("dict[str, Any]", schema)
seen_schema_ids: set[int] = set()
while "$ref" in schema_dict:
    ref = schema_dict["$ref"]
    if not isinstance(ref, str):
        raise SchemaDefinitionError("$ref must be a string.")
    schema_id = id(schema_dict)
    if schema_id in seen_schema_ids:
        raise SchemaDefinitionError(f"Circular $ref detected: {ref}")
    seen_schema_ids.add(schema_id)
    resolved = self._resolve_ref(ref)
    if isinstance(resolved, bool):
        return resolved
    schema_dict = resolved
return schema_dict

This remediation is robust because the components of the root schema remain in scope during the lifetime of the SchemaRepairer instance, which guarantees that Python's id() values are stable and not reused during the resolution process. Additionally, enforcing type checking on the $ref key prevents unexpected schema parsing exceptions.

Exploitation Methodology

Exploitation of this vulnerability requires that the target application accepts user-supplied JSON schemas and applies them to the loads() interface of the json-repair library. This is a common pattern in platforms that allow users to define structured output validation for LLM responses.

An attacker can trigger this behavior by constructing a minimal JSON payload accompanied by a schema dictionary containing circular references. The most direct vector involves pointing a $ref key to a definition path that resolves back to itself. The following JSON payload represents a reliable proof of concept:

{
  "malformedJSON": "{}",
  "schema": {
    "$ref": "#/definitions/a",
    "definitions": {
      "a": {
        "$ref": "#/definitions/a"
      }
    }
  }
}

When processed by an application using the vulnerable library version, the thread handling the parsing operation will freeze indefinitely. If the application runs in a single-threaded server environment, such as a basic Flask application, the entire server process becomes unresponsive to subsequent incoming requests.

Impact Assessment

The impact of this vulnerability is a complete loss of availability for the affected application components. Because the execution logic is CPU-bound rather than I/O-bound, the thread cannot yield execution control, which leads to total exhaustion of the hosting CPU core.

In containerized or shared environments, a series of requests utilizing this exploit can exhaust all available processor cores, affecting adjacent services. This vulnerability carries a CVSS v3.1 score of 7.5 (High) with an attack vector of Network, low attack complexity, and no privileges or user interaction required.

While the vulnerability does not allow remote code execution or data exposure, it represents an effective and low-cost vector for denial of service (DoS) against LLM middleware applications that dynamically evaluate user schemas.

Remediation and Mitigation

The primary remediation strategy is upgrading the json-repair package to version 0.60.1 or later, where the cycle-detection logic has been integrated. This upgrade completely mitigates the loop condition by raising a SchemaDefinitionError when circular structures are encountered.

If upgrading is not immediately feasible, developers must implement schema sanitization before passing objects to the repair utility. Applications should use stable third-party schema validators that support recursion limiters to validate the schema's structure prior to processing.

Additionally, hosting environments should enforce strict resource limits, such as maximum execution timeouts on web workers (e.g., Gunicorn or uWSGI timeout configurations). This ensures that any thread entering an infinite loop is automatically terminated before causing system-wide degradation.

Official Patches

mangiucugnaOfficial Security Advisory Release Note
mangiucugnaFixed Version Release Tag

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

Affected Systems

Applications utilizing python-json-repair to parse or validate schema-bounded outputs.Flask/FastAPI endpoints mapping POST payloads directly to the json_repair.loads schema parameter.Interactive playground applications showcasing LLM schema parsing techniques.

Affected Versions Detail

Product
Affected Versions
Fixed Version
json-repair
mangiucugna
< 0.60.10.60.1
AttributeDetail
CWE IDCWE-835
Attack VectorNetwork (AV:N)
CVSS Severity7.5 (High)
EPSS Score0.00045
ImpactDenial of Service (CPU Exhaustion)
Exploit StatusProof-of-Concept Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499.004Endpoint Denial of Service: Application Exhaustion
Impact
CWE-835
Loop with Unreachable Exit Condition ('Infinite Loop')

The program contains an iteration loop with an exit condition that cannot be reached or satisfied, causing infinite loop execution.

Known Exploits & Detection

GitHub AdvisoryDenial of Service proof of concept payload in advisory description.

References & Sources

  • [1]GitHub Advisory for GHSA-xf7x-x43h-rpqh
  • [2]Vulnerable Code Repository
  • [3]Official Security Advisory Release Note
  • [4]Fixed Version Release Tag

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

•about 2 hours ago•CVE-2026-54720
5.4

CVE-2026-54720: Stored Cross-Site Scripting (XSS) via Sandbox Bypass in Silverstripe Framework

CVE-2026-54720 is a stored Cross-Site Scripting (XSS) vulnerability inside the Silverstripe Framework's media shortcode processor. Due to a flawed performance optimization, HTML inputs containing two or fewer opening angle brackets bypassed security sandboxing. This flaw allows authenticated or lower-privileged users to inject administrative panel payloads that execute arbitrary client-side JavaScript when viewed by system administrators.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 3 hours ago•CVE-2026-54713
3.7

CVE-2026-54713: Idempotency Key Collision and Silent Job Dropping in cakephp/queue

An incomplete array comparison vulnerability in cakephp/queue version 0.1.11 through 2.3.0 allows unauthenticated attackers to cause key collisions in unique job deduplication. This is caused by standard array value sorting that discards associative keys, normalizing different payload keys to identical arrays and leading to a denial of service (DoS) by dropping legitimate jobs.

Alon Barad
Alon Barad
1 views•7 min read
•about 4 hours ago•CVE-2026-55558
5.9

CVE-2026-55558: STARTTLS Response Injection in aiosmtplib

An input buffering vulnerability exists in the aiosmtplib asynchronous SMTP client library before version 5.1.2. When upgrading a plaintext connection to TLS via STARTTLS, the library processes buffered plaintext responses after transport negotiation has completed. This behavior allows a network-positioned attacker to inject spoofed server responses prior to negotiation, leading to command/response desynchronization, arbitrary capability injection, and potential credential theft.

Alon Barad
Alon Barad
2 views•6 min read
•about 5 hours ago•CVE-2026-54770
6.1

CVE-2026-54770: Open Redirect via Parser Differential in WebOb

An open redirect vulnerability exists in WebOb before version 1.8.11 due to a parser differential between WebOb's validation logic and Python's standard urllib.parse.urljoin() function. Under Python 3.10+, the urljoin function strips leading and trailing space characters and C0 control characters, which allowed specially crafted inputs to bypass WebOb's prefix checks while still resolving as off-host redirects.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 6 hours ago•CVE-2026-54687
6.1

CVE-2026-54687: Path Traversal via User-Controlled Database File Path in n8n-nodes-sqlite3

Prior to version 1.0.0, the n8n-nodes-sqlite3 integration exposed the db_path parameter as an unrestricted node parameter. By default, n8n node parameters allow the evaluation of dynamic data expressions, meaning untrusted external input could be mapped to the database path. This vulnerability allows an external attacker to control which SQLite database file the n8n backend process attempts to open, leading to directory traversal outside of the intended directory context.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 7 hours ago•CVE-2026-42350
5.1

CVE-2026-42350: Client-Side Open Redirect in Kargo UI OIDC Authentication Flow

A client-side open redirect vulnerability has been identified in the Kargo user interface. The flaw resides in the handling of OpenID Connect (OIDC) login and token renewal flows, where the application extracts an unvalidated destination path from the redirectTo query parameter. Attackers can exploit this to redirect authenticated users to arbitrary external domains.

Alon Barad
Alon Barad
4 views•6 min read