{"id":"CVE-2022-35861","aliases":["EUVD-2022-38734","GHSA-7rf7-7xf5-v9v3","openSUSE-SU-2022:10183-1","openSUSE-SU-2024:12200-1"],"status":"published","title":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in...","description":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.00288,"percentile":0.21578,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2022-07-17T16:31:03Z","modified":"2026-10-28T02:30:59Z","fixes":[{"ecosystem":"SUSE:Package Hub 15 SP4","package":"pyenv","fixed_in":["2.3.5-bp154.2.3.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Leap 15.4","package":"pyenv","fixed_in":["2.3.5-bp154.2.3.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"SUSE:Package Hub 15 SP4","package":"pyenv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.5-bp154.2.3.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Leap 15.4","package":"pyenv","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.5-bp154.2.3.1"}]}]}],"products":[{"vendor":"pyenv","product":"pyenv"}],"references":[{"url":"https://github.com/pyenv/pyenv/commit/22fa683571d98b59ea16e5fe48ac411c67939653","tags":["x_refsource_MISC","x_transferred","Patch","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-35861","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-7rf7-7xf5-v9v3"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35861.json","tags":["advisory"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/IDXGUII5AFV4IIRR3AESPKYMZT4THLRR/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1201582","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2022-35861","tags":["web"]},{"url":"","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2022-35861","description":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)","status":"published","published":"2022-07-17T16:31:03Z","modified":"2024-08-03T09:44:22.146Z","updated_at":"2026-11-02T14:34:40.275153Z"}],"euvd":[{"id":"EUVD-2022-38734","description":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)","status":"published","published":"2022-07-17T16:31:03Z","modified":"2024-08-03T09:44:22Z","updated_at":"2026-11-03T03:25:26.818953Z"}],"ghsa":[{"id":"GHSA-7rf7-7xf5-v9v3","title":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in...","description":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)","status":"published","published":"2022-07-18T00:00:33Z","modified":"2023-01-27T05:06:27Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:42:55.025134Z"}],"nvd":[{"id":"CVE-2022-35861","description":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)","status":"published","published":"2022-07-17T17:15:08.233Z","modified":"2026-06-17T04:52:24.92Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":4.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:07:23.686531Z"}],"osv":[{"id":"CVE-2022-35861","description":"pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)","status":"published","published":"2022-07-17T16:31:03Z","modified":"2026-10-28T02:30:59.008767265Z","updated_at":"2026-11-02T15:44:26.195407Z"},{"id":"openSUSE-SU-2022:10183-1","title":"Security update for pyenv","description":"This update for pyenv fixes the following issues:\n\nUpdate to 2.3.5\n\n- Add CPython 3.10.7 by @edgarrmondragon in #2454\n- Docs: update Fish PATH update by @gregorias in #2449\n- Add CPython 3.7.14, 3.8.14 and 3.9.14 by @edgarrmondragon in #2456\n- Update miniconda3-3.9-4.12.0 by @Tsuki in #2460\n- Add CPython 3.11.0rc2 by @ViktorHaag in #2459\n- Add patches for 3.7.14 to support Apple Silicon by @samdoran in #2463\n- Add ability to easily skip all use of Homebrew by @samdoran in #2464\n- Drop Travis integration by @sobolevn in #2468\n- Build CPython 3.12+ with --with-dsymutil in MacOS by @native-api in #2471\n- Add Pyston 2.3.5 by @scop in #2476\n  Full Changelog: https://github.com/pyenv/pyenv/compare/v2.3.4...v2.3.5\n\nUpdate to 2.3.4\n\n- Add CPython 3.11.0rc1 by @edgarrmondragon in #2434\n- Add support for multiple versions in pyenv uninstall\n  by @hardikpnsp in #2432\n- Add micropython 1.18 and 1.19.1 by @dmitriy-serdyuk in #2443\n- CI: support Micropython, deleted scripts; build with -v\n  by @native-api in #2447\n- Re-allow paths in .python-version while still preventing CVE-2022-35861\n  by @comrumino in #2442\n- CI: Bump OS versions by @native-api in #2448\n- Add Cinder 3.8 by @filips123 in #2433\n- Add support for multiple versions in pyenv uninstall in #2432\n- Add micropython 1.18 and 1.19.1 in #2443\n- Add Cinder 3.8 in #2433\n\nUpdate to 2.3.3\n\n- Use version sort in pyenv versions by @fofoni in #2405\n- Add CPython 3.11.0b4 by @majorgreys in #2411\n- Python-build: Replace deprecated git protocol use with https in docs\n  by @ssbarnea in #2413\n- Fix relative path traversal due to using version string in path\n  by @comrumino in #2412\n- Allow pypy2 and pypy3 patching by @brogon in #2421, #2419\n- Add CPython 3.11.0b5 by @edgarrmondragon in #2420\n- Add GraalPython 22.2.0 by @msimacek in #2425\n- Add CPython 3.10.6 by @edgarrmondragon in #2428\n- Add CPython 3.11.0b4 by @majorgreys in #2411\n- Replace deprecated git protocol use with https\n  by @ssbarnea in docs #2413\n- Fix relative path traversal due to using version string in path\n  by @comrumino in #2412\n- Fix patterns for pypy2.*/pypy3.* versions by @brogon in #2419\n\nUpdate to 2.3.2\n\n- Add CPython 3.11.0b2 by @saaketp in #2380\n- Honor CFLAGS_EXTRA for MicroPython #2006 by @yggdr in #2007\n- Add post-install checks for curses, ctypes, lzma, and tkinter\n  by @aphedges in #2353\n- Add CPython 3.11.0b3 by @edgarrmondragon in #2382\n- Add flags for Homebrew into python-config --ldflags by @native-api\n  in #2384\n- Add CPython 3.10.5 by @illia-v in #2386\n- Add Anaconda 2019.10, 2021.04, 2022.05; support Anaconda in\n  add_miniconda.py by @native-api in #2385\n- Add Pyston-2.3.4 by @dand-oss in #2390\n- Update Anaconda3-2022.05 MacOSX arm64 md5 by @bkbncn in #2391\n- Fix boo#1201582 to fix CVE-2022-35861 (from commit 22fa683, file pyenv-CVE-2022-35861.patch)\n\nUpdate to 2.3.0\n\n- Bump openssl 1.1 to 1.1.1n for CPython 3.7 3.8 3.9 by @tuzi3040 in #2276\n- Doc Fix: Escape a hash character causing unwanted GitHub Issue linking by @edrogers in #2282\n- Add CPython 3.9.12 by @saaketp in #2296\n- Add CPython 3.10.4 by @saaketp in #2295\n- Add patch for 3.6.15 to support Xcode 13.3 by @nshine in #2288\n- Add patch for 3.7.12 to support Xcode 13.3 by @samdoran in #2292\n- Add CONTRIBUTING.md by @native-api in #2287\n- Add PyPy 7.3.9 release 2022-03-30 by @dand-oss in #2308\n- Add Pyston 2.3.3 by @scop in #2316\n- Add CPython 3.11.0a7 by @illia-v in #2315\n- Add 'nogil' Python v3.9.10 by @colesbury in #2342\n- Support XCode 13.3 in all releases that officially support MacOS 11 by @native-api in #2344\n- Add GraalPython 22.1.0 by @msimacek in #2346\n- Make PYENV_DEBUG imply -v for pyenv install by @native-api in #2347\n- Simplify init scheme by @native-api in #2310\n- Don't use Homebrew outside of MacOS by @native-api in #2349\n- Add :latest syntax to documentation for the install command by @hay in #2351\n\nUpdate to 2.2.5\n\n- fix issue 2236 for CPython 3.6.15 and 3.7.12 by @fofoni in #2237\n- python-build: add URL for get-pip for Python 3.6 by @fofoni in #2238\n- Add pyston-2.3.2 by @dmrlawson in #2240\n- CPython 3.11.0a5 by @saaketp in #2241\n- CPython 3.11.0a6 by @saaketp in #2266\n- Add miniconda 4.11.0 by @aphedges in #2268\n- docs(pyenv-prefix): note support for multiple versions by @scop in #2270\n- pypy 7.3.8 02/20/2022 release by @dand-oss in #2253\n","status":"published","published":"2022-10-31T17:01:33Z","modified":"2026-02-04T03:40:55.676542Z","updated_at":"2026-11-02T16:58:32.653274Z"},{"id":"openSUSE-SU-2024:12200-1","title":"pyenv-2.3.2-1.1 on GA media","description":"These are all security issues fixed in the pyenv-2.3.2-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:49:43.305009Z","updated_at":"2026-11-02T16:58:35.485255Z"}]}}
