CVE-2024-53848: Check jsonschema Check-jsonschema Default Caching For Remote Vulnerability
MODERATECVE-2024-53848 is a MODERATE (CVSS 7.1) check-jsonschema default caching for remote vulnerability (CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data) affecting Check jsonschema libraries in the PyPI ecosystem. The issue involves check-jsonschema default caching for remote schemas allows for cache confusion. Remediation is available by upgrading affected packages to version 0.30.0.
CVE-2024-53848 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N).
How to Fix CVE-2024-53848
To remediate this vulnerability, upgrade all affected Check jsonschema dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install check-jsonschema>=0.30.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show check-jsonschema
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-53848, inspect your installed packages using pip:
pip show check-jsonschema
Analyze the terminal output to locate any version of Check jsonschema in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.30.0), your application is affected.
Note: The pip show check-jsonschema command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data, where the product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted. In Check jsonschema, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-53848 Affected Check jsonschema Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
check-jsonschema
|
PyPI |
< 0.30.0
|
0.30.0
|
References
Frequently Asked Questions
What is CVE-2024-53848?
Which Check jsonschema versions are affected?
What version fixes CVE-2024-53848?
Is check-jsonschema affected?
What is the CVSS score of CVE-2024-53848?
What CWE is associated with CVE-2024-53848?
How can I check PyPI dependencies for CVE-2024-53848?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q6mv-284r-mp36",
"modified" : "2024-12-02T17:29:05Z",
"published" : "2024-12-02T17:29:05Z",
"aliases" : [ "CVE-2024-53848" ],
"summary" : "check-jsonschema default caching for remote schemas allows for cache confusion",
"details" : "### Impact\n\nThe 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.\n\nSuch a cache confusion attack could be used to allow data to pass validation which should have been rejected.\n\n### Patches\n\nA patch is in progress but has not yet been released.\n\n### Workarounds\n\n- Users can use `--no-cache` to disable caching.\n- 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.)\n- 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" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "check-jsonschema"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.30.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/python-jsonschema/check-jsonschema/security/advisories/GHSA-q6mv-284r-mp36"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53848"
}, {
"type" : "WEB",
"url" : "https://github.com/python-jsonschema/check-jsonschema/commit/c52714b85e6725b1b24516fbdedacb333b939152"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/python-jsonschema/check-jsonschema"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-349" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-02T17:29:05Z",
"nvd_published_at" : "2024-11-29T19:15:09Z"
}
}