GHSA-jv6m-48w5-5rpr: envd: Host file disclosure through requirements path traversal and TOCTOU

Published Nov 13, 2026
·
Updated

Summary

envd’s install.pythonpackages(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.

Affected Software

1 affected componentFixes available
pip/envd>=0.3.38<1.3.6
1.3.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/envd to a version that resolves this vulnerability.

    Fixed in 1.3.6
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in v1.3.6

Event History

Nov 13, 2026
Advisory Published
via GitHub·06:05 PM
Data Sourced
via GitHub·06:05 PM
DescriptionWeaknessAffected Software
Data Sourced
via OSV·06:05 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which versions are affected?

The vulnerable host-side requirements-file read was introduced in v0.3.38. v1.3.5 blocks static path escapes but still has the symlink time-of-check/time-of-use race; the complete fix is in v1.3.6.

2

What access does an attacker need to exploit this?

Exploitation requires local access with low privileges and the ability to influence the requirements-file path or its symlink target during the build. The vulnerable operation occurs when envd reads a requirements file on the host for install.python_packages(requirements=...).

3

What should teams do if they cannot patch immediately?

Avoid using requirements paths that can be influenced by untrusted local users or processes, particularly paths involving symlinks. Treat build logs and build-step metadata as potentially containing disclosed host-file content.

4

How can I determine whether a build may have been affected?

Review builds using install.python_packages(requirements=...) on envd versions from v0.3.38 through v1.3.5. Check build logs and build-step metadata for unexpected content that could have been interpreted as dependency entries from a host file.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203