CVE-2022-42906: Command Injection
powerline-gitstatus (aka Powerline Gitstatus) before 1.3.2 allows arbitrary code execution. git repositories can contain per-repository configuration that changes the behavior of git, including running arbitrary commands. When using powerline-gitstatus, changing to a directory automatically runs git commands in order to display information about the current repository in the prompt. If an attacker can convince a user to change their current directory to one controlled by the attacker, such as in a shared filesystem or extracted archive, powerline-gitstatus will run arbitrary commands under the attacker's control. NOTE: this is similar to CVE-2022-20001.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/powerline-gitstatusto a version that resolves this vulnerability.Fixed in 1.3.2 - Upgrade
Upgrade
debian/powerline-gitstatusto a version that resolves this vulnerability.Fixed in 1.3.2-1 - Upgrade
Upgrade
debian/powerline-gitstatusto a version that resolves this vulnerability.Fixed in 1.3.2-0+deb10u1Fixed in 1.3.2-0+deb11u1Fixed in 1.3.2-1 - Upgrade
Upgrade
powerline-gitstatus (Powerline Gitstatus)to a version that resolves this vulnerability.Fixed in 1.3.2 - Compensating control
When using powerline-gitstatus, avoid changing into attacker-controlled directories (e.g., directories on shared filesystems or extracted archives) that could contain malicious git repositories/configs.
Event History
Frequently Asked Questions
What is the severity of CVE-2022-42906?
CVE-2022-42906 has been classified as a critical vulnerability due to its potential for arbitrary code execution.
How do I fix CVE-2022-42906?
To remediate CVE-2022-42906, upgrade powerline-gitstatus to version 1.3.2 or later.
What is the impact of CVE-2022-42906 on my system?
CVE-2022-42906 could allow an attacker to execute arbitrary commands on systems using vulnerable versions of powerline-gitstatus.
Which versions of powerline-gitstatus are affected by CVE-2022-42906?
All versions of powerline-gitstatus prior to 1.3.2 are affected by CVE-2022-42906.
Does CVE-2022-42906 affect specific operating systems?
CVE-2022-42906 primarily impacts users of the powerline-gitstatus package, particularly on systems using Debian Linux version 10.0.