CVE-2026-27113
Received Received - Intake
Command Injection in Liquid Prompt via Malicious Git Branch Names

Publication date: 2026-02-20

Last updated on: 2026-02-20

Assigner: GitHub, Inc.

Description
Liquid Prompt is an adaptive prompt for Bash and Zsh. Starting in commit cf3441250bb5d8b45f6f8b389fcdf427a99ac28a and prior to commit a4f6b8d8c90b3eaa33d13dfd1093062ab9c4b30c on the master branch, arbitrary command injection can lead to code execution when a user enters a directory in a Git repository containing a crafted branch name. Exploitation requires the LP_ENABLE_GITSTATUSD config option to be enabled (enabled by default), gitstatusd to be installed and started before Liquid Prompt is loaded (not the default), and shell prompt substitution to be active (enabled by default in Bash via "shopt -s promptvars", not enabled by default in Zsh). A branch name containing shell syntax such as "$(...)" or backtick expressions in the default branch or a checked-out branch will be evaluated by the shell when the prompt is rendered. No stable release is affected; only the master branch contains the vulnerable commit. Commit a4f6b8d8c90b3eaa33d13dfd1093062ab9c4b30c contains a fix. As a workaround, set the LP_ENABLE_GITSTATUSD config option to 0.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-20
Last Modified
2026-02-20
Generated
2026-05-07
AI Q&A
2026-02-21
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
liquid_prompt liquid_prompt to a4f6b8d8c90b3eaa33d13dfd1093062ab9c4b30c (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the master branch of Liquid Prompt, an adaptive prompt for Bash and Zsh. It allows arbitrary command injection leading to code execution when a user enters a directory in a Git repository that contains a specially crafted branch name.

The issue occurs because branch names containing shell syntax like "$(...)" or backtick expressions are evaluated by the shell when the prompt is rendered. This happens if certain conditions are met: the LP_ENABLE_GITSTATUSD configuration option is enabled (which it is by default), gitstatusd is installed and started before Liquid Prompt loads (not the default), and shell prompt substitution is active (enabled by default in Bash but not in Zsh).

No stable release is affected; only the master branch contains the vulnerable commit. A fix was introduced in a later commit, and as a workaround, users can disable the LP_ENABLE_GITSTATUSD option.


How can this vulnerability impact me? :

If exploited, this vulnerability can lead to arbitrary code execution on your system when you enter a Git repository directory with a maliciously crafted branch name.

This could allow an attacker to run commands with the privileges of the user running the shell, potentially compromising the system or accessing sensitive data.

However, exploitation requires specific conditions to be met, including certain configuration options enabled and services running, which are not the default settings.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking if the system is running the vulnerable master branch of Liquid Prompt containing the commit cf3441250bb5d8b45f6f8b389fcdf427a99ac28a and prior to the fix commit a4f6b8d8c90b3eaa33d13dfd1093062ab9c4b30c.

Additionally, detection involves verifying if the LP_ENABLE_GITSTATUSD configuration option is enabled (which it is by default), if gitstatusd is installed and started before Liquid Prompt is loaded (not default), and if shell prompt substitution is active (enabled by default in Bash via "shopt -s promptvars").

You can check the current branch names in your Git repositories for suspicious shell syntax such as "$(...)" or backtick expressions that could trigger command injection when the prompt is rendered.

  • Check Liquid Prompt version or commit hash to confirm if it is within the vulnerable range.
  • Run `echo $LP_ENABLE_GITSTATUSD` to see if the gitstatusd integration is enabled.
  • Verify if gitstatusd is running: `ps aux | grep gitstatusd`.
  • Check if shell prompt substitution is enabled in Bash: `shopt promptvars`.
  • List Git branch names and look for suspicious characters: `git branch --list` or `git branch -r`.

What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability immediately, you should set the LP_ENABLE_GITSTATUSD configuration option to 0, which disables the gitstatusd integration and prevents the arbitrary command injection.

Alternatively, update Liquid Prompt to include the fix introduced in commit a4f6b8d8c90b3eaa33d13dfd1093062ab9c4b30c or later, as no stable release is affected and only the master branch contains the vulnerable commit.

Also, ensure that gitstatusd is not installed or started before Liquid Prompt is loaded, and consider disabling shell prompt substitution if possible.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart