CWE-915Weakness · CWE-915

CVE-2025-58367

CRITICAL · 10.0 CVSS v4.0 Published 2025-09-05
Patch available
A vendor patch is available. No clean upgrade release — apply the published patch.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
DeepDiff is a project focused on Deep Difference and search of any Python data. Versions 5.0.0 through 8.6.0 are vulnerable to class pollution via the Delta class constructor, and when combined with a gadget available in DeltaDiff, it can lead to Denial of Service and Remote Code Execution (via insecure Pickle deserialization) exploitation. The gadget available in DeepDiff allows `deepdiff.serialization.SAFE_TO_IMPORT` to be modified to allow dangerous classes such as posix.system, and then perform insecure Pickle deserialization via the Delta class. This potentially allows any Python code to be executed, given that the input to Delta is user-controlled. Depending on the application where DeepDiff is used, this can also lead to other vulnerabilities. This is fixed in version 8.6.1.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

DeepDiff versions 5.0.0-8.6.0 contain a class pollution vulnerability in the Delta class constructor. Attackers can manipulate deepdiff.serialization.SAFE_TO_IMPORT to allow dangerous classes like posix.system, then achieve Remote Code Execution through insecure Pickle deserialization when user-controlled input is passed to the Delta class.

MitigationUpgrade DeepDiff to version 8.6.1 or later. Additionally, never pass untrusted user input directly to the Delta class without thorough validation, as the underlying Pickle deserialization vulnerability can be exploited if Delta input is user-controlled.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
Authentication
X
User interaction
None
Scope
X

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check DeepDiff installed version
    Run 'pip show deepdiff' or 'pip list | grep -i deepdiff' to retrieve the installed version number
    Affected if The version falls within 5.0.0 to 8.6.0 inclusive
  2. Locate Delta class usage in code
    Search source code for imports of 'Delta' from 'deepdiff' or 'deepdiff.serialization' and subsequent instantiation (e.g., Delta(input), Delta(data), Delta(config))
    Affected if Code passes any user-controlled or external input directly to Delta() constructor without validation
  3. Inspect SAFE_TO_IMPORT attribute
    Run Python: 'from deepdiff import serialization; print(serialization.SAFE_TO_IMPORT)' to view current value
    Affected if The attribute contains dangerous classes like 'posix.system', 'os.system', 'subprocess' modules, or any class not present in the default safe allowlist
  4. Check for pickle deserialization patterns
    Search code for patterns where Delta receives pickled data, serialized strings, or data from external sources (HTTP requests, files, user inputs) that may contain serialized Delta objects
    Affected if Delta is instantiated with data from untrusted sources, especially data that could contain pickled objects
  5. Audit Delta class instantiation context
    Review all call sites where Delta() is invoked and trace the source of the input argument - check if it originates from user input, HTTP headers, file upload, API call, or any external source
    Affected if Any Delta() call receives input that originates from users, APIs, files, or external systems without validation

You are affected if DeepDiff version is 5.0.0-8.6.0 AND the Delta class is used with any external or user-controlled input, or if SAFE_TO_IMPORT has been modified from its default safe allowlist.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Patch available Apply the vendor patch
Vendor patch github.com →
Interim mitigation

Upgrade DeepDiff to version 8.6.1 or later. Additionally, never pass untrusted user input directly to the Delta class without thorough validation, as the underlying Pickle deserialization vulnerability can be exploited if Delta input is user-controlled.

Recommended fix High confidence

Upgrade to DeepDiff version 8.6.1 or later

  1. Check the current installed version of DeepDiff by running: pip show deepdiff or pip list | grep deepdiff
  2. If the installed version is between 5.0.0 and 8.6.0 (inclusive), upgrade to the fixed version using: pip install deepdiff>=8.6.1
  3. Verify the upgrade was successful by running: pip show deepdiff
  4. If using a requirements.txt file, update the DeepDiff version specification to: deepdiff>=8.6.1
  5. Test the application to ensure functionality is maintained after the upgrade

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation3.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA2.0 h
17.0 hours of engineering $3,000
Get the patch applied

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,800.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-58367 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-58367 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data