---
id: "CVE-2026-128079"
page: "https://infrastack.ai/live/CVE-2026-128079"
kind: "vulnerability"
aliases: ["CVE-2026-128079", "GHSA-jv6m-48w5-5rpr"]
title: "envd: Host file disclosure through requirements path traversal and TOCTOU"
severity: "medium"
cvss: 6.8
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "envd", "fixed": ["1.3.6"], "affected": ">= 0.3.38, < 1.3.6", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-22", "cwe-367", "envd", "package", "python", "sandbox-builds"]
not_affected_if: ["no-untrusted-build-input", "not-using-python-packages-requirements"]
published_at: "2026-11-13T18:05:15+00:00"
first_seen_at: "2026-11-13T18:07:02+00:00"
updated_at: "2026-11-13T18:49:29+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-jv6m-48w5-5rpr", "first_seen_at": "2026-11-13T18:07:02+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-128079", "first_seen_at": "2026-11-13T18:49:29+00:00"}]
exploit_sources: []
---

# envd: Host file disclosure through requirements path traversal and TOCTOU

Link for people: https://infrastack.ai/live/CVE-2026-128079 (this .md is for agents)

envd reads requirements files on the host during builds, and a path traversal plus a race between symlink check and file open lets a build input read files outside its build context. Contents interpreted as dependency entries can appear in build logs and build-step metadata.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:envd affected >= 0.3.38, < 1.3.6 fixed 1.3.6

## How to check

- Check the installed version with `pip show envd` and compare it to the affected range (>= 0.3.38, < 1.3.6).
- Look for `install.python_packages(requirements=...)` calls in build definitions that take paths from untrusted input.

## Fix

- `envd` `1.3.6` (fixed version per the product data; v1.3.5 is still affected by the TOCTOU variant)

## Timeline

- 2026-11-13T18:07:02+00:00 ghsa https://github.com/advisories/GHSA-jv6m-48w5-5rpr
- 2026-11-13T18:49:29+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-128079

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/tensorchord/envd/security-advisories/GHSA-jv6m-48w5-5rpr
- [advisory] Maintainer's advisory: github.com https://github.com/tensorchord/envd/security/advisories/GHSA-jv6m-48w5-5rpr
- [fix] Patch: github.com https://github.com/tensorchord/envd/pull/2112
- [fix] Patch: github.com https://github.com/tensorchord/envd/pull/2119
- [fix] Patch: github.com https://github.com/tensorchord/envd/commit/9d575b354ce17a02ef9698b6ff0d5d14296c5734
- [fix] Patch: github.com https://github.com/tensorchord/envd/commit/f576c92c1e6dcb9b00b60995534aeb2a83b0b407
- [fix] Release: github.com https://github.com/tensorchord/envd/releases/tag/v1.3.6

## From the sources

### Summary

envd’s `install.python_packages(requirements=...)` could read files outside the build context on the host. Content interpreted as dependency entries could appear in build logs and build-step metadata.

Commit f576c92, released in v1.3.5, added path containment validation but left a time-of-check/time-of-use (TOCTOU) race between symlink resolution and opening the requirements file. Commit 9d575b3 addresses this race by opening requirements files through a directory-rooted filesystem handle.

### Details

envd reads requirements files on the host to determine whether their contents can be embedded directly into a pip installation build step.

The vulnerable host-side requirements read was introduced in v0.3.38. Version v1.3.5 added containment checks for static path escapes but remained vulnerable to a TOCTOU race. The complete fix is included in v1.3.6.

Before f576c92, this host read lacked a build-context containment check. That commit added frontend path validation and a compile-time check using filepath.EvalSymlinks followed by a containment comparison.

However, symlink resolution returns a pathname rather than a pinned filesystem object. The subsequent os.Open independently resolves that pathname. Concurrent filesystem changes could therefore invalidate the containment check before the file was opened.

The complete fix uses os.OpenRoot and Root.Open to enforce containment during filesystem traversal.

Resources:
- first commit: be783264fdd79ad7262cea0485b7d449ca514f80
- Initial containment fix: f576c92
- TOCTOU fix: 9d575b3

### Proof of concept

The security-relevant condition is a requirements-file pathname whose filesystem resolution changes between validation and opening. The containment check describes the filesystem at validation time, while the later pathname-based open may access a different object.

The fix includes a deterministic regression test for the underlying object-pinning guarantee. It opens a context directory handle, moves that directory, and creates a replacement directory at the original pathname containing different requirements. The rooted reader continues reading the original context; a pathname-based reader reads the replacement.

This regression test demonstrates the distinction between rooted and pathname-based reads. It is not an end-to-end demonstration of host file disclosure.

### Impact

An attacker who can influence the build input—and, for the residual race in v1.3.5, concurrently modify the relevant filesystem paths—may cause envd to read files outside the intended build context, subject to the permissions of the envd process.

Depending on the file contents and requirements parsing, information may be exposed through dependency debug logs and build-step metadata. This issue does not establish arbitrary code execution or unrestricted disclosure of every file.

v1.3.5 remains affected by the TOCTOU variant. Earlier versions containing the host requirements-reading behavior are affected by the original containment issue; confirm the earliest affected release before setting the advisory’s version range.

Patched version: v1.3.6.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
