Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-58367: CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes in seperman deepdiff

0
Critical
VulnerabilityCVE-2025-58367cvecve-2025-58367cwe-915
Published: Fri Sep 05 2025 (09/05/2025, 21:52:31 UTC)
Source: CVE Database V5
Vendor/Project: seperman
Product: deepdiff

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.

AI-Powered Analysis

AILast updated: 09/12/2025, 23:54:15 UTC

Technical Analysis

CVE-2025-58367 is a critical vulnerability affecting the DeepDiff Python library versions 5.0.0 through 8.6.0. DeepDiff is a tool used for deep difference detection and searching within Python data structures. The vulnerability arises from improper control over dynamically determined object attributes, specifically within the Delta class constructor. This flaw allows an attacker to perform class pollution, which can be exploited when combined with a gadget available in the DeltaDiff module. The core issue involves the modification of the deepdiff.serialization.SAFE_TO_IMPORT attribute, which is intended to restrict the classes allowed during deserialization. By manipulating this attribute, an attacker can enable the import of dangerous classes such as posix.system. This leads to insecure Pickle deserialization, a well-known vector for remote code execution (RCE) in Python applications. Since the input to the Delta class can be user-controlled, an attacker can craft malicious input that triggers arbitrary code execution on the host system. The impact of this vulnerability extends beyond RCE; it can also cause Denial of Service (DoS) conditions depending on the application context. The vulnerability is classified under CWE-915, which relates to improper control of dynamically determined object attributes. The issue was addressed and fixed in DeepDiff version 8.6.1. The CVSS v4.0 score is 10.0 (critical), reflecting the vulnerability's high exploitability and severe impact on confidentiality, integrity, and availability without requiring authentication or user interaction.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially those relying on Python applications that incorporate the DeepDiff library for data comparison or processing. The ability to execute arbitrary Python code remotely can lead to full system compromise, data breaches, and disruption of critical services. Organizations in sectors such as finance, healthcare, government, and critical infrastructure that utilize Python-based automation, data analysis, or configuration management tools are particularly at risk. The vulnerability could be exploited to deploy ransomware, steal sensitive data, or disrupt operations. Given the lack of authentication and user interaction requirements, exploitation can be automated and widespread. Additionally, the potential for Denial of Service attacks could impact availability of services, leading to operational downtime and reputational damage. The vulnerability's presence in a widely used open-source library increases the likelihood of indirect exposure through third-party applications and services, amplifying the risk to European enterprises.

Mitigation Recommendations

European organizations should immediately audit their software dependencies to identify any usage of DeepDiff versions between 5.0.0 and 8.6.0. The primary mitigation is to upgrade to DeepDiff version 8.6.1 or later, where the vulnerability has been fixed. For environments where immediate upgrade is not feasible, organizations should implement strict input validation and sanitization on any user-controlled data passed to the Delta class or related DeepDiff functionalities. Employ application-level sandboxing or runtime restrictions to limit the impact of potential code execution. Monitoring and logging of deserialization activities can help detect exploitation attempts. Additionally, organizations should review their software supply chain and third-party applications to identify indirect usage of vulnerable DeepDiff versions. Employing Web Application Firewalls (WAFs) or Intrusion Detection Systems (IDS) with signatures targeting this vulnerability can provide temporary protection. Finally, organizations should ensure that their incident response teams are prepared to handle potential exploitation scenarios involving Python deserialization vulnerabilities.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-08-29T16:19:59.012Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68bb5cd1535f4a977310270f

Added to database: 9/5/2025, 9:57:37 PM

Last enriched: 9/12/2025, 11:54:15 PM

Last updated: 10/21/2025, 5:25:50 AM

Views: 151

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats