CyberRota Analysis
AI-GeneratedPrior to version 2.8.0, Pyenv's handling of .python-version values and various commands allowed for shell glob metacharacters and unquoted PYENV_VERSION expansion, potentially enabling an attacker to manipulate the interpreter or version selection through crafted filenames. This vulnerability could lead to the execution of unintended Python versions or interpreters, posing a risk to environments relying on Pyenv for version management. Users of Pyenv, especially those managing multiple Python environments, should prioritize upgrading to version 2.8.0 to mitigate this risk.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
Pyenv provides simple Python version management. Prior to 2.8.0, is_version_safe() in libexec/pyenv-version-file-read accepts shell glob metacharacters in .python-version values, and unquoted PYENV_VERSION expansion in libexec/pyenv-version-name, libexec/pyenv-which, libexec/pyenv-prefix, libexec/pyenv-local, libexec/pyenv-global, libexec/pyenv-version, and libexec/pyenv-versions pathname-expands the value against the current directory, allowing a matching attacker-controlled file to silently select a different installed interpreter or version. This issue is fixed in version 2.8.0.