Skip to content

🐛 fix(uv): ignore relative store roots - #210

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:security/cm0qslvr-uv-roots
Nov 3, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:security/cm0qslvr-uv-roots

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

_uv_state_dirs() accepted empty and relative APPDATA values on Windows. That could make discovery probe a Python candidate from the caller's working directory. Invalid APPDATA values now use the profile default, and discovery ignores relative state roots. This addresses draft advisory ANT-2026-CM0QSLVR.

uv store roots

uv stores managed Python versions under its persistent data directory. The old lookup appended uv/data/python or uv/python to Path(APPDATA) even when that path was relative. _propose_from_uv() then passed candidates to interpreter probing. The Windows lookup now falls back to the profile directory, and the root enumerator drops relative state paths.

Behavior changes

Empty or relative APPDATA values use the profile's roaming directory. Relative HOME or USERPROFILE values cannot create implicit working-directory stores. UV_PYTHON_INSTALL_DIR retains its existing override behavior.

Reported by Antigravity: ANT-2026-CM0QSLVR.

An empty or relative profile path could make uv discovery search the
caller's working directory for an interpreter. Use the profile default
for invalid APPDATA and skip any remaining relative state roots.
@gaborbernat gaborbernat added the bug Something isn't working label Nov 2, 2026
@gaborbernat gaborbernat added the security Security fixes and advisories label Nov 3, 2026
@gaborbernat
gaborbernat merged commit 8925b8c into tox-dev:main Nov 3, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working security Security fixes and advisories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant