/

CVE-2026-48720

Severity:

HIGH RISK

(8.8)

Improper File Creation (CWE-73) via OSC 1337 in Warp

CVE-2026-48720

Deferred

Vulnerability type

Category:

Improper Input Validation / File Handling

CWE:

CWE-20, CWE-73

Impact:

Unauthorized Local File Creation and Modification

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Certain versions of Warp improperly trust non-inline OSC 1337;File escape sequences emitted by terminal output, automatically creating local files without user confirmation.

If a user runs commands that produce crafted terminal output, this can lead to unexpected file materialization, potentially overwriting or planting files in the local environment.

Affected context

This issue occurs in Warp's handling of OSC 1337;File terminal control sequences for file transfer and display.

When Warp is used to run commands that emit non-inline OSC 1337;File payloads, the client automatically decodes and materializes these payloads as files on the local system without an explicit user approval step.

The vulnerability is relevant in interactive sessions where users execute scripts, remote tools, or third-party utilities that can control terminal output and may embed such payloads.

Exploit preconditions

  • Attack surface: Terminal output rendered in Warp.
  • Required access: Ability to cause the Warp terminal to display crafted escape sequences (e.g., via executed commands, remote shells, or scripts).
  • Trigger point: Emission of a non-inline OSC 1337;File payload in terminal output that Warp interprets as a file transfer command.
  • Why exploitation is possible: Warp implicitly trusts and processes these escape sequences, decoding and writing the referenced payload to disk without validating intent or requiring user confirmation.

Why this happens

The root cause is insufficient validation and trust management of control sequences used for file transfer in the terminal protocol.

Warp treats non-inline OSC 1337;File payloads as benign instructions and automatically materializes the associated data as local files, failing to distinguish between trusted, user-initiated operations and arbitrary terminal output.

This maps to CWE-73: External Control of File Name or Path, as external data dictates which files are created or modified, and to CWE-20: Improper Input Validation, since the client does not adequately constrain or authorize the processing of these escape sequences before performing file-system operations.

Potential impact

  • An attacker-controlled command output may create unexpected files in the user's environment.
  • Terminal output can overwrite or modify existing files, depending on where payloads are placed.
  • Malicious files (e.g., scripts or configuration artifacts) could be planted to influence subsequent tooling or workflows.
  • Users may be misled by silently created files, impacting the integrity of local projects or development environments.

General mitigation guidance

Mitigation generally focuses on tightening the trust boundary around terminal escape sequences and file transfer mechanisms.

Effective patterns include:

  • Treating OSC 1337;File and similar control sequences as potentially untrusted input and requiring explicit user consent before writing files.
  • Restricting file creation and modification to clearly scoped, user-approved directories rather than arbitrary paths.
  • Introducing robust validation for any externally controlled file metadata (such as names and locations), rejecting or sanitizing values that do not conform to safe patterns.
  • Applying least-privilege principles to client-side file operations, limiting the ability of terminal protocols to affect sensitive files or configuration assets.

How teams detect issues like this

High-level detection approaches involve:

  • Reviewing terminal client code paths that interpret escape sequences or protocol messages to identify direct file-system writes without authorization checks.
  • Using static analysis or linting rules to flag code that handles externally controlled file names or paths without validation or user interaction.
  • Implementing security-focused code review guidelines around terminal protocol handling, especially for features that create or modify local files.
  • Monitoring for unusual or unexpected files appearing in development environments after terminal sessions, potentially aided by local integrity or audit mechanisms.

Sources

SourceLink
github.comgithub.com/warpdotdev/warp/commit/f3b9ce1c8fd13d037526c447418d809087722daa
github.comgithub.com/warpdotdev/warp/security/advisories/GHSA-5h96-jrrq-6hxq

Frequently asked

questions

Yes, in the sense that any remote process or service that can control terminal output in a Warp session can attempt to exploit the behavior, as long as a user runs commands that emit the crafted sequences.

The attacker needs the ability to influence what is printed to the Warp terminal—this could be via a remote shell, malicious script, or compromised tool chain, rather than direct access to the local file system.

The safest approach is to require explicit, interactive user approval before any terminal-driven file transfer or creation occurs, combined with strict validation and scoping of file paths processed by such features.

Design terminal and client-side features under the assumption that output can be attacker-controlled, enforce clear trust boundaries, validate control sequences rigorously, and integrate security-focused reviews and automated checks around any functionality that touches the local file system.

Find out what's already
exploitable in your codebase.