Skip to content

uv lookup reads process HOME outside supplied environment #200

Closed

Description

@gaborbernat

When an explicit env mapping omits HOME, uv interpreter discovery still searches the process HOME. This can execute a candidate outside the locations named by the mapping. Release 1.9.1 and main 1d88a437de96fb335e2e4044e71341b9c101980c reproduce.

The full reproduction is in draft advisory GHSA-828q-59cf-rgp5, visible to repository maintainers.

Affected code

_uv_state_dirs() substitutes ~ for a missing mapped home and expands it against the process environment.

Impact

If another local user can write the process HOME uv store, a privileged caller can run that user's candidate during discovery. Reproducibility is moderate because the lookup must reach the store; exposure is niche because the process HOME must be writable by another user while the caller omits HOME from the explicit mapping.

Credits

Reported by Anthropic's OSS Scanner: ANT-2026-XQVCZ8E5.

Activity

  1. added
    bugSomething isn't working
    securitySecurity fixes and advisories
    on Nov 2, 2026
  2. changed the title [-]uv lookup falls back to process HOME without mapped HOME[/-] [+]uv lookup reads process HOME outside supplied environment[/+] on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity fixes and advisories

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions