Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-100867 Overview
CVE-2026-100867 is a terminal escape sequence injection vulnerability in spaceship-prompt through version 4.22.5, a popular Zsh prompt framework. The flaw resides in how the prompt renders project manifest version fields. Specifically, spaceship-prompt fails to sanitize control characters before displaying package version data in the Zsh prompt. Attackers can embed ANSI or Operating System Command (OSC) escape sequences into version fields of package manifests. When a victim changes into a repository directory containing a malicious manifest, the prompt renders the attacker-controlled bytes, enabling terminal output manipulation, window-title rewriting, and visual spoofing of displayed text. The issue is tracked under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences.
Critical Impact
A victim entering a malicious repository directory can have their terminal output, window title, and displayed command text spoofed, which can facilitate social-engineering or command-confusion attacks.
Affected Products
- spaceship-prompt versions up to and including 4.22.5
- Zsh shell environments configured with the vulnerable prompt framework
- Developer workstations that auto-load prompt sections from project manifests (for example package.json)
Discovery Timeline
- 2026-09-27 - CVE-2026-100867 published to the National Vulnerability Database (NVD)
- 2026-09-30 - Last updated in NVD
Technical Details for CVE-2026-100867
Vulnerability Analysis
The vulnerability stems from unsanitized rendering of project manifest data in prompt sections. The package section of spaceship-prompt reads the version field from a project manifest, such as package.json, and passes the raw string to the prompt renderer. The rendering helper in lib/section.zsh emits the value directly into the Zsh prompt stream without filtering control characters. Because terminals interpret ANSI Control Sequence Introducer (CSI) and OSC sequences at render time, any escape bytes embedded in the version string become live terminal commands rather than displayed text. The affected code paths are documented in lib/section.zsh lines 100-102 and sections/package.zsh line 41.
Successful exploitation does not grant code execution. It allows an attacker to control what the victim sees on screen, including the ability to overwrite characters, hide text, change colors, and modify the terminal window title through OSC 0, 1, and 2 sequences.
Root Cause
The root cause is missing neutralization of escape and control sequences before writing externally sourced data to a terminal, as classified by CWE-150. The prompt framework treats manifest content as trusted display text and does not strip or escape bytes in the 0x00-0x1F and 0x7F ranges, nor does it quote OSC and CSI introducers.
Attack Vector
Exploitation requires an attacker to publish or commit a project manifest that contains escape sequences in a parsed field such as version. A victim running a vulnerable spaceship-prompt installation triggers the issue by cd-ing into the project directory, which causes the prompt to re-render and interpret the hostile bytes. The attack is local in CVSS terms and requires user interaction, but the trigger is a routine developer action. See the VulnCheck advisory on spaceship-prompt and GitHub Issue #1567 for additional context.
Detection Methods for CVE-2026-100867
Indicators of Compromise
- Package manifests (package.json, composer.json, and similar) whose version field contains bytes in the 0x1B (ESC), 0x07 (BEL), or other C0 control character ranges.
- Unexpected terminal window title changes immediately after entering a project directory.
- Prompt rendering artifacts such as truncated text, color bleed, or cursor repositioning when cd-ing into third-party repositories.
Detection Strategies
- Scan source repositories and package registries for manifest files containing non-printable characters in metadata fields.
- Add pre-commit and CI checks that reject manifests whose string fields contain ANSI or OSC escape sequences.
- Review spaceship-prompt installations across developer fleets and inventory versions at or below 4.22.5.
Monitoring Recommendations
- Log shell session output on sensitive developer workstations and alert on OSC title-set sequences originating from prompt rendering.
- Monitor endpoint telemetry for cloning or extraction of repositories flagged as containing control characters in manifests.
- Track package-manager install events paired with subsequent shell directory changes into the installed path.
How to Mitigate CVE-2026-100867
Immediate Actions Required
- Upgrade spaceship-prompt to a release later than 4.22.5 once a fixed version is published by the maintainers. Track the status at the spaceship-prompt GitHub repository.
- Disable the package prompt section on developer workstations that frequently clone untrusted repositories.
- Educate developers to treat terminal title changes or visual anomalies after cd as a potential indicator of a tampered manifest.
Patch Information
At the time of publication, the issue is tracked upstream in GitHub Issue #1567. Apply the fixed release once it is tagged by the maintainers. Users building from source should pin to a commit that includes sanitization of control characters in lib/section.zsh and manifest-parsing helpers such as sections/package.zsh.
Workarounds
- Remove or comment out the package section from the SPACESHIP_PROMPT_ORDER configuration until a patched release is available.
- Wrap prompt output with a filter that strips bytes in the 0x00-0x1F and 0x7F ranges from any externally sourced string.
- Avoid changing into untrusted repository directories inside interactive shells; inspect manifests with tools such as cat -v or hexdump -C before use.
# Configuration example: disable the vulnerable package section in ~/.zshrc
SPACESHIP_PROMPT_ORDER=(
dir
git
node
# package # disabled pending fix for CVE-2026-100867
exec_time
line_sep
char
)
# Optional: sanitize manifest version fields before inspection
alias safecat='LC_ALL=C sed -e "s/[[:cntrl:]]/?/g"'
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

