Vulnerabilities in pkg:pypi/check-jsonschema

PACKAGE
Advisory Identifier: GHSA-q6mv-284r-mp36
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/check-jsonschema

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/check-jsonschema. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-q6mv-284r-mp36 CVE-2024-53848 MODERATE check-jsonschema default caching for remote schemas allows for cache confusion

CVE-2024-53848 at a Glance

CVE Identifier CVE-2024-53848
GHSA Identifier GHSA-q6mv-284r-mp36
Severity MODERATE
CVSS v3.1 Base Score 7.1
CWE Classification CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data
Affected Product Check jsonschema
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (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.

check-jsonschema fixed: 0.30.0
pip install check-jsonschema>=0.30.0
Verify Direct and Transitive Dependencies

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

### Impact 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. ### Patches A patch is in progress but has not yet been released. ### Workarounds - Users can use `--no-cache` to disable caching. - 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.) - 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`

CVE-2024-53848 Affected Check jsonschema Versions

1 component(s)
Fixed Versions:
0.30.0
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?
CVE-2024-53848 is a security vulnerability in Check jsonschema involving check-jsonschema default caching for remote schemas allows for cache confusion under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data.
Which Check jsonschema versions are affected?
Affected versions include releases prior to 0.30.0 across affected packages: check-jsonschema.
What version fixes CVE-2024-53848?
Upgrading to 0.30.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is check-jsonschema affected?
Yes, check-jsonschema is affected in releases prior to 0.30.0. Upgrade your dependency to 0.30.0 or later.
What is the CVSS score of CVE-2024-53848?
CVE-2024-53848 has a CVSS v3.1 base score of 7.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2024-53848?
CVE-2024-53848 is classified under CWE-349: Acceptance of Extraneous Untrusted Data With Trusted Data (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.).
How can I check PyPI dependencies for CVE-2024-53848?
Run the dependency tree command: 'pip show check-jsonschema'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}