CVE-2025-5150: Docarray Docarray Prototype Pollution Vulnerability

MODERATE
Advisory Identifier: GHSA-j9wp-865g-rf48
CVSS 6.3
CWE-1321 CWE-94
Published
Advisory Summary

CVE-2025-5150 is a MODERATE (CVSS 6.3) docarray prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Docarray libraries in the PyPI ecosystem. The issue involves docarray prototype pollution. Remediation is available in the latest vendor maintenance releases.

CVE-2025-5150 at a Glance

CVE Identifier CVE-2025-5150
GHSA Identifier GHSA-j9wp-865g-rf48
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Docarray
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2025-5150

To remediate this vulnerability, upgrade all affected Docarray dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

docarray fixed: Latest secure release
pip install docarray>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show docarray

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-5150, inspect your installed packages using pip:

pip show docarray

Analyze the terminal output to locate any version of Docarray in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show docarray command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Docarray, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability was found in docarray up to 0.40.1. It has been rated as critical. Affected by this issue is the function __getitem__ of the file /docarray/data/torch_dataset.py of the component Web API. The manipulation leads to improperly controlled modification of object prototype attributes ('prototype pollution'). The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

CVE-2025-5150 Affected Docarray Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
docarray
PyPI
≤ 0.40.1

References

Frequently Asked Questions

What is CVE-2025-5150?
CVE-2025-5150 is a security vulnerability in Docarray involving docarray prototype pollution under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Docarray versions are affected?
Affected versions include releases prior to current release patches across affected packages: docarray.
What version fixes CVE-2025-5150?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is docarray affected?
Yes, docarray is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-5150?
CVE-2025-5150 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2025-5150?
CVE-2025-5150 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check PyPI dependencies for CVE-2025-5150?
Run the dependency tree command: 'pip show docarray'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j9wp-865g-rf48",
  "modified" : "2025-06-04T20:52:34Z",
  "published" : "2025-05-25T15:30:32Z",
  "aliases" : [ "CVE-2025-5150" ],
  "summary" : "docarray prototype pollution",
  "details" : "A vulnerability was found in docarray up to 0.40.1. It has been rated as critical. Affected by this issue is the function __getitem__ of the file /docarray/data/torch_dataset.py of the component Web API. The manipulation leads to improperly controlled modification of object prototype attributes ('prototype pollution'). The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "docarray"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.40.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-5150"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/superboy-zjc/56502343bcb12eb653081b426debf2c8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/docarray/docarray"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.310238"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.310238"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?submit.574696"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321", "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-27T19:54:33Z",
    "nvd_published_at" : "2025-05-25T15:15:22Z"
  }
}