Class Pollution Affecting deepdiff package, versions [5.0.0,8.6.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.33% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Class Pollution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-DEEPDIFF-12485343
  • published5 Sept 2025
  • disclosed3 Sept 2025
  • creditDiogo Correia

Introduced: 3 Sep 2025

NewCVE-2025-58367  (opens in a new tab)
CWE-915  (opens in a new tab)

How to fix?

Upgrade deepdiff to version 8.6.1 or higher.

Overview

deepdiff is a Deep Difference and Search of any Python object/data. Recreate objects by adding adding deltas to each other.

Affected versions of this package are vulnerable to Class Pollution via the Delta constructor and manipulation of the SAFE_TO_IMPORT set. An attacker can execute arbitrary code or cause application crashes by supplying crafted input that exploits class pollution and insecure deserialization.

Note: This is exploitable if untrusted user input is passed directly to the Delta class.

CVSS Base Scores

version 4.0
version 3.1