Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify Mongoose server compiled with MG_ENABLE_DIRLIST
-
DeliveryCraft percent-encoded XSS payload in URL path
-
ExploitDeliver malicious link to authenticated victim
-
InstallVictim browser requests crafted URL
-
C2Server reflects decoded path into HTML title/h1
-
ExecuteInjected script executes in Mongoose origin
-
ImpactExfiltrate session token or perform authenticated actions
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Two explicit prerequisites must both be satisfied: (1) the target Mongoose server was compiled with the |
| Impact | The CVSS 3.1 score of 5.4 (Medium) reflects the moderate but real-world constrained nature of this flaw: AV:N/AC:L/PR:N confirm a network-reachable, low-complexity, unauthenticated attack surface, while UI:R and S:U cap the impact by requiring victim interaction and containing blast radius to the Mongoose origin. The confidentiality and integrity impacts (C:L/I:L) correspond to session theft and on-behalf-of actions - meaningful but not catastrophic. No EPSS score was provided, so exploitation probability cannot be quantified; however, the absence of any CISA KEV listing and no known public exploit code meaningfully reduces urgency. The critical risk-reducing factor is the non-default |
| Exploit ScenarioDerived | An attacker discovers a Mongoose-based embedded web interface with |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Reflected cross-site scripting in Cesanta Mongoose (all versions prior to 7.22) allows a remote unauthenticated attacker to inject arbitrary JavaScript into a victim's browser by crafting a percent-encoded URL path targeting the directory listing handler. The mg_http_serve_dir() and listdir() functions in src/http.c insert the decoded request URI directly into <title> and <h1> HTML elements without HTML entity escaping, and the resulting script executes in the Mongoose origin. Exploitation requires both that the server was compiled with MG_ENABLE_DIRLIST enabled and that a victim user is persuaded to visit the malicious link; no public exploit or CISA KEV listing is identified at time of analysis.
RemediationAI
Upgrade to Mongoose 7.22 or later; the patched release is available at https://github.com/cesanta/mongoose/releases/tag/7.22, and the underlying code change is in PR #3611 (commit a9df523f76f43a38bd53b4232b9cfd4c16869e71). The fix adds the html_esc() function to escape HTML-special characters in directory listing output, eliminating the injection point. If an immediate upgrade is not feasible, the most effective compensating control is recompiling without the MG_ENABLE_DIRLIST flag, which removes the vulnerable code path entirely at the cost of disabling directory listing functionality. For deployments where MG_ENABLE_DIRLIST is already compiled in and cannot be changed, restrict network access to the directory-listing endpoint via firewall rules or reverse-proxy ACLs to limit who can craft and deliver malicious URLs - note that this does not prevent exploitation by users already permitted to reach the endpoint and must be paired with user-awareness measures.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Mongoose (CPE: cpe:2.3:a:cesanta:mongoose) is a single-file embedded C web server and networking library by Cesanta, widely used in IoT firmware, embedded devices, and constrained environments. The flaw is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation) and is rooted in the absence of HTML entity encoding in the directory listing code path within src/http.c. When the compile-time flag MG_ENABLE_DIRLIST is active, HTTP request path components are percent-decoded and written verbatim into the HTML response's <title> and <h1> elements. The fix introduced in version 7.22 (PR #3611, commit a9df523) adds a dedicated html_esc() function that iterates over each character of the filename or path and substitutes HTML-special characters before they are emitted into the response, eliminating the injection point at its source.
Know when Mongoose gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Network-reachable with no auth required, but victim must click link; scope unchanged as XSS executes only within the Mongoose origin with limited C/I impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Mongoose ODM for Node.js before version 8.9.5 contains a search injection vulnerability when using $where filters with p
An exploitable stack buffer overflow vulnerability exists in the MQTT packet parsing functionality of Cesanta Mongoose 6
An exploitable use-after-free vulnerability exists in the HTTP server implementation of Cesanta Mongoose 6.8. Rated crit
An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.
An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.
Prototype Pollution in GitHub repository automattic/mongoose prior to 7.3.4. Rated critical severity (CVSS 9.8), this vu
Prototype Pollution in GitHub repository automattic/mongoose prior to 6.4.6. Rated critical severity (CVSS 9.8), this vu
An integer overflow in parse_mqtt in mongoose.c in Cesanta Mongoose 6.16 allows an attacker to achieve remote DoS (infin
Mongoose before 8.8.3 can improperly use $where in match, leading to search injection. Rated critical severity (CVSS 9.1
The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 (compiled with OpenSSL support) is vulnerable to remote OO
The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 and 6.7-6.18 (compiled with mbedTLS support) is vulnerable
The mg_http_serve_file function in Cesanta Mongoose HTTP server 7.0 is vulnerable to remote OOB write attack via connect
EUVD-2026-63498
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB