CVE-2026-49864 wetty vulnerable to DOM XSS via file-download filename

High 8.6 Published Updated

Attacker can execute arbitrary JavaScript and inject keystrokes into victim's SSH session via malicious file download filenames in wetty.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-49864?

CVE-2026-49864 is a high-severity cross-site scripting vulnerability in butlerx wetty, published on 13 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

wetty provides terminal access in browser over http/https. Prior to version 3.0.4, the wetty client decodes a base64 filename from the file-download escape sequence and interpolates it raw into a Toastify HTML string (`escapeMarkup: false`). Any output the victim renders - a `cat`'d file, a tailed log, an SSH MOTD, a `curl` response - that contains `\x1b[5i...:...\x1b[4i` runs script in the wetty origin and types attacker-chosen keystrokes into the victim's SSH session. Version 3.0.4 fixes the issue.

Weakness: CWE-79

Which versions are affected by CVE-2026-49864?

2 open source packages ship an affected version, including wetty.

PackageAffectedFixed in
wetty npmAll versions3.0.4
wetty npmAll versions3.0.4

How do I fix CVE-2026-49864?

Upgrade wetty to 3.0.4 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-49864 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49864 exists.

Sources

Also known as GHSA-p26j-h7wj-r568.

Is CVE-2026-49864 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free