CVE-2025-58367 DeepDiff is vulnerable to DoS and Remote Code Execution via Delta class pollution
Attackers can achieve remote code execution and denial of service by exploiting insecure Pickle deserialization in the Delta class constructor.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-58367?
CVE-2025-58367 is a critical unsafe deserialization vulnerability in seperman deepdiff, published on 5 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-915
Which versions are affected by CVE-2025-58367?
3 open source packages ship an affected version, including deepdiff.
| Package | Affected | Fixed in |
|---|---|---|
deepdiff PyPI | From 5.0.0 | 8.6.1 |
deepdiff PyPI | From 5.0.0 | 8.6.1 |
deepdiff PyPI | From 5.0.0 | 8.6.1 |
Linux distribution packages (2)
python-deepdiff openSUSE:Leap 15.6 | All versions | 6.3.0-150600.3.3.1 |
python-deepdiff openSUSE:Tumbleweed | All versions | 8.6.1-1.1 |
How do I fix CVE-2025-58367?
Upgrade deepdiff to 8.6.1 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2025-58367 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-58367 exists.
Sources
Also known as CLSA-2025-1757981510, DEBIAN-CVE-2025-58367, GHSA-mw26-5g2v-hqw3, MINI-wwjv-xv2w-qj4r, PYSEC-2026-327, SUSE-SU-2025:03127-1 and 2 more.