Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

RUSTSEC-2026-0430

UNSCORED

Path traversal in `rio-vt` Kitty graphics protocol handler allows out-of-bounds file delete (and read)

Mitigation

  • Upgrade rio-vt to 0.5.29 or later.

Who should check

  • Projects that depend on crates.io package rio-vt (>= 0.0.0-0, < 0.5.29)

Vulnerability facts

Affected
rio-vt >= 0.0.0-0, < 0.5.29
Fixed in
0.5.29
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Unknown
CVSS
Not scored yet
Published
Modified

Description

The Kitty graphics protocol handler in `rio-vt` builds a filesystem path from an attacker-controlled APC escape sequence and, for the temp-file medium, only checks that the path *contains the substring* `"tty-graphics-protocol"` before it opens, reads, and `remove_file`s it. There is no `..` rejection and no canonicalization, so a path containing the marker substring plus `..` escapes the terminal's temp directory (path traversal, CWE-22/CWE-23). Because a terminal renders whatever arrives on the PTY (ssh output, a `cat`'d file, CI logs), untrusted output can delete a file outside the temp area and cause its bytes to be read back in. ## Details The sink is `create_graphic_data()` in `src/ansi/kitty_graphics_protocol.rs`, in the `TransmissionMedium::TempFile` branch, reachable through the public API `rio_vt::ansi::kitty_graphics_protocol::parse`. The path is the base64 APC payload of an `a=t,t=t` command, and the guard is: ```rust let path = Path::new(path_str); if !path.is_file() { return Err(GraphicError::FileNotFound); } // literal path, resolves `..` // reject /proc/ /sys/ /dev/ (lowercased substring) if cmd.medium == TransmissionMedium::TempFile && !path_str.contains("tty-graphics-protocol") { // SUBSTRING, not a component return Err(GraphicError::InvalidData); } // ... let mut file = File::open(path)...; // reads file bytes if cmd.medium == TransmissionMedium::TempFile { let _ = std::fs::remove_file(path); // deletes the file } ``` This affects any terminal emulator or application built on `rio-vt` (e.g. the Rio terminal) that renders attacker-influenced output: an out-of-bounds file is deleted, and its contents are read into the process. ## The fix Fixed in `rio-vt` 0.5.29 (Rio 0.5.29) by [PR #1998](https://github.com/raphamorim/rio/pull/1998). For the temp-file medium the parent directory is resolved with `canonicalize` before any check, the resolved entry must lie inside a temp directory (`temp_dir()`, `/tmp` or `/dev/shm`) and contain the marker, and the delete goes through `unlinkat` on a handle to the validated directory, so neither `..` nor a swapped symlink can redirect it. Path checks for the file medium also run on the file actually opened.

Affected and fixed versions

Package / productAffectedFixedSource
crates.io rio-vt>= 0.0.0-0, < 0.5.290.5.29osv

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by RUSTSEC-2026-0430. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/RUSTSEC-2026-0430.md
Affected: rio-vt >= 0.0.0-0, < 0.5.29
Fixed in: 0.5.29

Steps:
1. Search this machine and project for rio-vt (crates.io): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is RUSTSEC-2026-0430 being exploited?

There is no confirmed exploitation: RUSTSEC-2026-0430 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

How serious is RUSTSEC-2026-0430?

It has no CVSS score yet. Unknown.

Which versions are affected by RUSTSEC-2026-0430?

rio-vt >= 0.0.0-0, < 0.5.29.

Is there a fix for RUSTSEC-2026-0430?

Yes. Fixed in 0.5.29. Upgrade rio-vt to 0.5.29 or later.

How do I check if I'm affected by RUSTSEC-2026-0430?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors