7.8high
pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory.
- Severity
- 7.8high CVSS:3.1 by NVD
- Exploit likelihood
- 0.29% (higher than 23% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
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.)
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| pyenv pyenv | from 1.2.24 up to 2.3.2 | NVD |
All scores
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 4.6medium CVSS:2.0 | AV:L/AC:L/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
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.)
NVD (es)
pyenv versiones 1.2.24 hasta 2.3.2, permite a usuarios locales conseguir privilegios por medio de un archivo .python-version en el directorio de trabajo actual. Un atacante puede diseñar una cadena de versión de Python en .python-version para ejecutar shims bajo su control. (Los shims son ejecutables que pasan un comando a una versión específica de pyenv. La cadena de versión es usada para construir la ruta al comando, y no es comprobado si la versión especificada es una versión válida. Por lo tanto, puede producirse un salto de rutas relativo)
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-35861 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2022-35861 changed 2026-06-17 | Public domain |