CVE-2024-53848
Description
check-jsonschema is a CLI and set of pre-commit hooks for jsonschema validation. The default cache strategy uses the basename of a remote schema as the name of the file in the cache, e.g. `https://example.org/schema.json` will be stored as `schema.json`. This naming allows for conflicts. If an attacker can get a user to run `check-jsonschema` against a malicious schema URL, e.g., `https://example.evil.org/schema.json`, they can insert their own schema into the cache and it will be picked up and used instead of the appropriate schema. Such a cache confusion attack could be used to allow data to pass validation which should have been rejected. This issue has been patched in version 0.30.0. All users are advised to upgrade. A few workarounds exist: 1. Users can use `--no-cache` to disable caching. 2. Users can use `--cache-filename` to select filenames for use in the cache, or to ensure that other usages do not overwrite the cached schema. (Note: this flag is being deprecated as part of the remediation effort.) 3. Users can explicitly download the schema before use as a local file, as in `curl -LOs https://example.org/schema.json; check-jsonschema --schemafile ./schema.json`
Weakness
- CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2024-12-02 |
Timeline
- 2024-11-29Published by the CNA18:39 UTC
- 2024-12-02GitHub advisory published (GHSA-q6mv-284r-mp36)3 days after publication
- 2024-12-02CISA SSVC decision recorded3 days after publication
Exploit and advisory records
GitHub advisory GHSA-q6mv-284r-mp36, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| PyPI check-jsonschema | before 0.30.0 | 0.30.0 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| python-jsonschema check-jsonschema |
References
- https://github.com/python-jsonschema/check-jsonschema/commit/c52714b85e6725b1b24516fbdedacb333b939152
- https://github.com/python-jsonschema/check-jsonschema/security/advisories/GHSA-q6mv-284r-mp36
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2024-53848'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2024-53848'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2024-53848'curl 'https://api.contrastcyber.com/cve_products/CVE-2024-53848'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).