CVE-2026-128079: envd Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-jv6m-48w5-5rpr
CWE-367 CWE-22
Published
Advisory Summary

CVE-2026-128079 is a MODERATE path traversal vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting envd libraries in the PyPI ecosystem. The issue involves host file disclosure through requirements path traversal and toctou. Remediation is available by upgrading affected packages to version 1.3.6.

CVE-2026-128079 at a Glance

CVE Identifier CVE-2026-128079
GHSA Identifier GHSA-jv6m-48w5-5rpr
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product envd
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-128079

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

envd fixed: 1.3.6
pip install envd>=1.3.6
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 envd

How to Check if You Are Affected

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

pip show envd

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In envd, 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

### 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.

CVE-2026-128079 Affected envd Versions

1 component(s)
Fixed Versions:
1.3.6
Product / Package Ecosystem Affected Versions Fixed Version
envd
PyPI
≥ 0.3.38
< 1.3.6
1.3.6

References

Frequently Asked Questions

What is CVE-2026-128079?
CVE-2026-128079 is a security vulnerability in envd involving Host file disclosure through requirements path traversal and TOCTOU under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which envd versions are affected?
Affected versions include releases prior to 1.3.6 across affected packages: envd.
What version fixes CVE-2026-128079?
Upgrading to 1.3.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is envd affected?
Yes, envd is affected in releases prior to 1.3.6. Upgrade your dependency to 1.3.6 or later.
What CWE is associated with CVE-2026-128079?
CVE-2026-128079 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check PyPI dependencies for CVE-2026-128079?
Run the dependency tree command: 'pip show envd'. 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-jv6m-48w5-5rpr",
  "modified" : "2026-11-13T18:05:15Z",
  "published" : "2026-11-13T18:05:15Z",
  "aliases" : [ "CVE-2026-128079" ],
  "summary" : "envd: Host file disclosure through requirements path traversal and TOCTOU",
  "details" : "### Summary\n\nenvd’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.\n\nCommit 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.\n\n### Details\n\nenvd reads requirements files on the host to determine whether their contents can be embedded directly into a pip installation build step.\n\nThe 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.\n\nBefore 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.\n\nHowever, 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.\n\nThe complete fix uses os.OpenRoot and Root.Open to enforce containment during filesystem traversal.\n\nResources:\n- first commit: be783264fdd79ad7262cea0485b7d449ca514f80\n- Initial containment fix: f576c92\n- TOCTOU fix: 9d575b3\n\n### Proof of concept\n\nThe 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.\n\nThe 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.\n\nThis regression test demonstrates the distinction between rooted and pathname-based reads. It is not an end-to-end demonstration of host file disclosure.\n\n### Impact\n\nAn 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.\n\nDepending 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.\n\nv1.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.\n\nPatched version: v1.3.6.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "envd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.38"
      }, {
        "fixed" : "1.3.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tensorchord/envd/security/advisories/GHSA-jv6m-48w5-5rpr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tensorchord/envd/pull/2112"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tensorchord/envd/pull/2119"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tensorchord/envd/commit/9d575b354ce17a02ef9698b6ff0d5d14296c5734"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tensorchord/envd/commit/f576c92c1e6dcb9b00b60995534aeb2a83b0b407"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tensorchord/envd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tensorchord/envd/releases/tag/v1.3.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-367" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-13T18:05:15Z",
    "nvd_published_at" : null
  }
}