External risk intelligence

DeepDiff Class Pollution Leading to Code Execution.

CVE advisorySeverity: CRITICAL (CVSS 10.0)

CVE-2025-58367

DeepDiff is a software library, not a standalone network service or appliance. Its exposure depends entirely on whether a downstream application uses it to process untrusted, user-controlled input in an internet-facing component. While it can be reachable in such deployments, the library itself is typically integrated into internal application logic rather than acting as a public-facing edge service.

Remote Code Execution

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A security vulnerability in the DeepDiff Python library could allow attackers to execute arbitrary Python code, potentially leading to denial of service or remote code execution, depending on how and where the library is implemented. The main concern is to confirm if this library is used within your organization and if it processes user-controlled input.

  • Unchecked input in DeepDiff enables code execution.
  • Understand its use to assess potential exposure.
  • Verify usage to determine relevance and impact.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by controlling input to the Delta class constructor in the DeepDiff library. This allows them to manipulate the `SAFE_TO_IMPORT` setting, enabling the execution of arbitrary Python code through insecure Pickle deserialization. The attacker's journey begins with an application that uses a vulnerable version of DeepDiff to process user-supplied data.

  • Accessible via network with no privileges.
  • User-controlled input to Delta class constructor.
  • Remote code execution and denial of service.

Live Threat

Current exploitation, exposure, and threat context

When DeepDiff processes user-controlled input through its `Delta` class constructor, it could allow for the modification of import security settings, potentially leading to the execution of arbitrary Python code via insecure Pickle deserialization. This could impact applications that use DeepDiff for data comparison and searching when handling untrusted data.

  • Python code execution.
  • Insecure Pickle deserialization.
  • Application compromise.

Operational Fix

Recommended remediation, mitigation, and detection steps

The Application Development or Platform Engineering teams are likely responsible for managing DeepDiff, as it's a Python library integrated into applications. The first step is to identify applications using the vulnerable versions, confirm if they process user-controlled input, and assess business criticality to prioritize remediation.

  • Application owners should investigate library usage.
  • Verify processing of user-controlled input.
  • Plan remediation based on exposure.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the DeepDiff library used for?

DeepDiff is a Python software library designed for performing deep comparisons, difference detection, and searching across complex data structures. Developers typically integrate it into their custom applications to track changes in objects or datasets, rather than using it as a standalone service. Because it operates as a modular component, its functionality is embedded directly into the internal logic of the software that relies on it.

What does CWE-915 mean for CVE-2025-58367?

CWE-915 refers to Improperly Controlled Modification of Dynamically-Determined Object Attributes, often called class pollution. In the context of CVE-2025-58367, this means an attacker can manipulate specific internal settings within the library. By abusing the Delta class constructor, they can bypass security restrictions and override import safeguards, which ultimately allows the library to process malicious data that would normally be blocked.

How is this vulnerability triggered?

The vulnerability is triggered when an application passes untrusted, user-supplied data into the DeepDiff Delta class constructor. Simply having the library installed in your environment does not trigger the bug; the defect requires a path where external input reaches this specific function. If your application uses DeepDiff solely for internal data processing without any connection to external user input, it does not meet the necessary conditions for this exploit.

How do I know if my systems are relevant?

Halo Surface Signal indicates that relevance depends on whether your internet-facing applications use DeepDiff to handle data from external users. Since this is a library, the risk is not tied to a specific network service but to the application code itself. If your public-facing software accepts user input that is then processed by the vulnerable Delta class, your environment is potentially susceptible to this issue.

What are the first steps to address this?

Your development team should begin by auditing the software dependency tree to identify where versions 5.0.0 through 8.6.0 of DeepDiff are in use. Once identified, evaluate whether those specific applications pass user-controlled input to the Delta class constructor. If this data flow is confirmed, the primary path to resolution is updating to version 8.6.1 or newer, which resolves the class pollution issue.

References