CVE-2026-73259

Mongoose: Reflected XSS via decoded URI in directory listing render

Published Aug 20, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
Mongoose is an embedded web server and network library. Prior to 7.22, a remote attacker can send a crafted percent-encoded request path to a deployment using MG_ENABLE_DIRLIST and persuade a user to visit it. The mg_http_serve_dir() and listdir() path in src/http.c places the decoded request URI into the title and h1 elements without HTML entity encoding. The resulting reflected cross-site scripting executes in the Mongoose origin and can expose session data or perform actions as the victim. This issue is fixed in version 7.22.

Analysis

AI-generated

Technical impact

A percent‑encoded request path directed to a directory listing endpoint in Mongoose 7.21 and earlier places the decoded URI directly into the HTML title and h1 tags without escaping, allowing a reflected cross‑site scripting attack. When a vulnerable user visits the crafted URL, the browser executes the embedded script in the context of the Mongoose origin, which can compromise session data or perform actions on behalf of that user.

Affected Systems

Cesanta’s Mongoose web server, versions earlier than 7.22. Any deployment using the MG_ENABLE_DIRLIST option is susceptible, including all 7.x releases prior to the 7.22 fix.

Risk and Exploitability

The CVSS score of 5.4 indicates moderate severity and an attack vector that requires network access to the HTTP endpoint. The EPSS score is not available, so exploitation likelihood cannot be quantified, and the vulnerability is not listed in the CISA KEV catalog. An attacker must craft a percent‑encoded path and persuade a victim to visit the URL; no privilege escalation is required, but the impact is limited to the victim’s session. The vulnerability would be exploitable as long as directory listings remain enabled on a reachable instance of any affected Mongoose version.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Mongoose version 7.22 or later, which removes the unescaped decoded URI from the directory listing output.
  • If upgrading is not immediately possible, disable the MG_ENABLE_DIRLIST option to prevent directory listings from being served.
  • As a temporary safeguard, verify that other dynamic content rendered by Mongoose is properly HTML‑escaped to mitigate similar XSS risks in the codebase.

Generated by OpenCVE AI on August 20, 2026 at 19:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:cesanta:mongoose:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Cesanta
Cesanta mongoose
Vendors & Products Cesanta
Cesanta mongoose
Type Values Removed Values Added
Description Mongoose is an embedded web server and network library. Prior to 7.22, a remote attacker can send a crafted percent-encoded request path to a deployment using MG_ENABLE_DIRLIST and persuade a user to visit it. The mg_http_serve_dir() and listdir() path in src/http.c places the decoded request URI into the title and h1 elements without HTML entity encoding. The resulting reflected cross-site scripting executes in the Mongoose origin and can expose session data or perform actions as the victim. This issue is fixed in version 7.22.
Title Mongoose: Reflected XSS via decoded URI in directory listing render
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 20, 2026, 7:51 PM
Reserved
Aug 11, 2026, 5:18 PM
Status
Analyzed
Published
Aug 20, 2026, 6:16 PM
Modified
Oct 18, 2026, 8:10 PM