Junglewise Threat Intelligence

CVE-2026-73259: Mongoose reflected cross-site scripting in directory listing

CVE-2026-73259 · Severity: medium · CVSS 5.4 · Published 2026-08-20

Vendors: Cesanta.

Executive brief

Mongoose is an embedded web server library used to build web-based interfaces into applications and devices. When directory listing is enabled, attackers can craft malicious URLs containing JavaScript code that executes in users' browsers with the server's privileges, potentially stealing session data or performing unauthorized actions.

Technical details

Mongoose versions prior to 7.22 are vulnerable to reflected cross-site scripting (XSS) in the directory listing feature (MG_ENABLE_DIRLIST). The vulnerability exists in the mg_http_serve_dir() and listdir() functions in src/http.c, which fail to HTML-encode user-supplied percent-encoded request paths before inserting them into HTML title and h1 elements. An attacker can send a crafted URL containing JavaScript payloads that execute in the context of the Mongoose origin when a victim visits the link. No authentication is required; the attack requires network access to the Mongoose server and victim interaction (clicking a malicious link). The vulnerability is fixed in Mongoose 7.22 and later.

Affected products

  • Cesanta Mongoose prior to 7.22

Timeline

  • 2026-08-20: disclosed
  • 2026-06-23: patched: Fix merged in commit a9df523 on 2026-06-23; version 7.22 contains the patch

References