Json repair: json_repair: Circular JSON Schema `$ref` causes unbounded CPU DoS
Affects json-repairSource GCVE Database
CVSS 7.5 High : upgrade to 0.60.1 soon.
Data as of 14 Jul 2026, 09:45 UTC
- Patch
- Available – fixed in 0.60.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HWhat to do
Upgrade json-repair to 0.60.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIjson-repair | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The recommended fix involves adding cycle detection in resolve_schema() to raise an error when a circular $ref is detected, preventing infinite loops. If you cannot patch yet, avoid processing untrusted schemas or implement external safeguards such as request timeouts or input validation to detect circular references.
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.