GHSA-xf7x-x43h-rpqh: json_repair: Circular JSON Schema `$ref` causes unbounded CPU DoS
SchemaRepairer.resolve_schema() in json_repair follows JSON Schema $ref pointers in an unbounded while loop without any cycle detection. An attacker who can supply a schema containing a self-referencing $ref (e.g., via the demo Flask API or any application that passes untrusted input to loads(..., schema=...)), can cause a worker process to spin indefinitely on CPU, resulting in a complete denial of service. No authentication is required against the public demo API. The vulnerability is confirmed reproducible at CVSS 7.5 (High).
print("\n" + “=” * 64) if baseline_ok and attack_confirmed: print(“VERDICT: PASS”) print(" Normal schema : returned in under 1 s") print(f" Circular $ref : still running after {TIMEOUT_SECONDS}s (killed)") print(" Conclusion: resolve_schema() enters an unbounded loop on circular $ref.") return 0 elif not attack_confirmed: print(“VERDICT: FAIL — circular $ref did not cause an infinite loop”) print(" The library may already be patched in this build.") return 2 else: print(“VERDICT: FAIL — baseline test failed; check the environment”) return 3
if name == “main”: sys.exit(main())
References
Code Behaviors & Features
Detect and mitigate GHSA-xf7x-x43h-rpqh with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →