CVE-2024-53848
check-jsonschema default caching for remote schemas allows for cache confusion
Check your servers for CVE-2024-53848
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-53848 affects check-jsonschema, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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`
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality none, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.14%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 3.93% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 2 Dec 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-349 Acceptance of Extraneous Untrusted Data With Trusted Data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| check-jsonschema |
affected < 0.30.0
|
Is my server affected?
Find the installed version of check-jsonschema and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i check-jsonschema
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-53848 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-53848RHEL, Rocky, Alma, Fedora
rpm -q check-jsonschema
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-53848Alpine
apk list --installed | grep -i check-jsonschemaWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-53848
trivy image --scanners vuln IMAGE | grep CVE-2024-53848
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://github.com/python-jsonschema/check-jsonschema/security/advisories/GHSA-q6mv-284r-mp36 github.com
Other references
Source: the record CVE-2024-53848 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse