# CVE-2025-61677: DataChain: Deserialization of Untrusted Data from Environment Variables

> An attacker who can set specific environment variables can trigger arbitrary code execution in the DataChain library during application startup.

- **Severity:** Low 2.5 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Oct 2025
- **Updated:** 6 Oct 2025
- **Also known as:** GHSA-6px8-mr29-cj4r, PYSEC-2026-1288

## What is CVE-2025-61677?

CVE-2025-61677 is a low-severity unsafe deserialization vulnerability in iterative datachain, published on 3 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

DataChain is a Python-based AI-data warehouse for transforming and analyzing unstructured data. Versions 0.34.1 and below allow for deseriaization of untrusted data because of the way the DataChain library reads serialized objects from environment variables (such as DATACHAIN__METASTORE and DATACHAIN__WAREHOUSE) in the loader.py module. An attacker with the ability to set these environment variables can trigger code execution when the application loads. This issue is fixed in version 0.34.2.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2025-61677?

3 open source packages ship an affected version, including datachain.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `datachain` | PyPI | All versions | 0.34.2 |
| `datachain` | PyPI | All versions | 0.34.2 |
| `datachain` | PyPI | All versions | 0.34.2 |

## How do I fix CVE-2025-61677?

Upgrade datachain to 0.34.2 or later.

## Is CVE-2025-61677 being exploited?

There is no known exploitation of CVE-2025-61677 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-61677 and fix it if it is affected.

What it is: CVE-2025-61677 is a low-severity unsafe deserialization vulnerability in iterative datachain, published on 3 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-61677 in the wild and no public exploit code.

Affected packages and fixed versions:
- datachain (PyPI): affected all versions; fixed in 0.34.2
- datachain (PyPI): affected all versions; fixed in 0.34.2
- datachain (PyPI): affected all versions; fixed in 0.34.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-61677/ (Markdown: https://insights.sbomify.com/CVE-2025-61677/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-61677
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-61677
- OSV: https://osv.dev/vulnerability/CVE-2025-61677

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-61677/
Summaries are generated and may contain mistakes; the official description above is the record.
