CVE-2026-73254 Mongoose: Stored XSS via unescaped filenames in directory listing
Attackers can inject scripts via filenames in directory listings, allowing session theft or victim actions in Mongoose web servers.
- 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-73254?
CVE-2026-73254 is a medium-severity cross-site scripting vulnerability in Cesanta Mongoose, published on 20 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
Mongoose is an embedded web server and network library. Prior to 7.22, an attacker who can create a file with an HTML payload in its name can trigger stored cross-site scripting when a user browses a directory served with MG_ENABLE_DIRLIST. The printdirentry() path called by listdir() in src/http.c URL-encodes the href but inserts the raw filesystem filename into the HTML link text. The browser executes the injected markup in the Mongoose origin, which can expose session data or permit actions as the victim. This issue is fixed in version 7.22.
Weakness: CWE-79
Which versions are affected by CVE-2026-73254?
It affects 1 product.
Products include Cesanta Mongoose.
How do I fix CVE-2026-73254?
Upgrade to a fixed version.
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-73254 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-73254 exists.
Other vulnerabilities in Cesanta Mongoose
Sources
Also known as DEBIAN-CVE-2026-73254, GHSA-5g6j-m3pv-4f7g, JLSEC-2026-1378, UBUNTU-CVE-2026-73254.