Json repair: json_repair: Circular JSON Schema `$ref` causes unbounded CPU DoS
A denial of service vulnerability exists in the json_repair library before version 0.60.1 due to unbounded CPU consumption caused by circular JSON Schema $ref references. The function resolve_schema() follows $ref pointers in an unbounded loop without cycle detection, allowing an attacker to supply a self-referencing schema that causes an infinite loop. This vulnerability is exploitable without authentication via the demo Flask API. The issue results in a high-severity denial of service by exhausting CPU resources indefinitely.
AI Analysis
Technical Summary
The json_repair library's SchemaRepairer.resolve_schema() method processes JSON Schema $ref pointers in a while loop without detecting cycles. When a schema contains a circular $ref, such as a reference pointing to itself, the loop never terminates because the same dictionary object is repeatedly returned by _resolve_ref(). This leads to unbounded CPU usage and a denial of service. The vulnerability is reachable without authentication through the demo Flask API, which accepts attacker-controlled schemas with minimal validation. The recommended fix is to add cycle detection by tracking visited schema objects and raising an error upon detecting a circular reference.
Potential Impact
An attacker can cause a worker process using json_repair to consume CPU indefinitely by submitting a crafted JSON Schema with circular $ref references. This results in a denial of service condition, making the service unresponsive. No authentication is required to exploit this via the publicly accessible demo API. There is no impact on confidentiality or integrity reported, only availability is affected.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The recommended fix involves adding cycle detection in resolve_schema() to raise an error when a circular $ref is detected, preventing infinite loops. Until a patch is available, avoid processing untrusted schemas or implement external safeguards such as request timeouts or input validation to detect circular references.
Json repair: json_repair: Circular JSON Schema `$ref` causes unbounded CPU DoS
Description
A denial of service vulnerability exists in the json_repair library before version 0.60.1 due to unbounded CPU consumption caused by circular JSON Schema $ref references. The function resolve_schema() follows $ref pointers in an unbounded loop without cycle detection, allowing an attacker to supply a self-referencing schema that causes an infinite loop. This vulnerability is exploitable without authentication via the demo Flask API. The issue results in a high-severity denial of service by exhausting CPU resources indefinitely.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The json_repair library's SchemaRepairer.resolve_schema() method processes JSON Schema $ref pointers in a while loop without detecting cycles. When a schema contains a circular $ref, such as a reference pointing to itself, the loop never terminates because the same dictionary object is repeatedly returned by _resolve_ref(). This leads to unbounded CPU usage and a denial of service. The vulnerability is reachable without authentication through the demo Flask API, which accepts attacker-controlled schemas with minimal validation. The recommended fix is to add cycle detection by tracking visited schema objects and raising an error upon detecting a circular reference.
Potential Impact
An attacker can cause a worker process using json_repair to consume CPU indefinitely by submitting a crafted JSON Schema with circular $ref references. This results in a denial of service condition, making the service unresponsive. No authentication is required to exploit this via the publicly accessible demo API. There is no impact on confidentiality or integrity reported, only availability is affected.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The recommended fix involves adding cycle detection in resolve_schema() to raise an error when a circular $ref is detected, preventing infinite loops. Until a patch is available, avoid processing untrusted schemas or implement external safeguards such as request timeouts or input validation to detect circular references.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-xf7x-x43h-rpqh
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a55ff8968715ace432f46e3
Added to database: 07/14/2026, 09:21:13 UTC
Last enriched: 07/14/2026, 09:45:35 UTC
Last updated: 07/31/2026, 15:49:20 UTC
Views: 25
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.