Skip to main content

Mongoose EUVDEUVD-2026-63498

| CVE-2026-73259 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-20 GitHub_M
5.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify Mongoose server compiled with MG_ENABLE_DIRLIST
  2. Delivery
    Craft percent-encoded XSS payload in URL path
  3. Exploit
    Deliver malicious link to authenticated victim
  4. Install
    Victim browser requests crafted URL
  5. C2
    Server reflects decoded path into HTML title/h1
  6. Execute
    Injected script executes in Mongoose origin
  7. Impact
    Exfiltrate 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 MG_ENABLE_DIRLIST compile-time flag - this is non-default and requires deliberate opt-in at build time, so most Mongoose deployments are not affected; and (2) the attacker must persuade a victim user to visit a crafted URL (UI:R per CVSS). No authentication is required from the attacker (PR:N per the provided CVSS vector). Exploitation is bounded to the Mongoose web origin - scope is unchanged (S:U), so the reflected script cannot directly access cross-origin resources. The most significant limiting factor for defenders is the MG_ENABLE_DIRLIST requirement: inventorying build configurations to confirm whether this flag is in use is the critical triage step before assessing exposure.

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 MG_ENABLE_DIRLIST compile-time requirement: only deployments that deliberately enable this flag are exposed, significantly narrowing the attack surface compared to a default-configuration flaw. For affected deployments (especially those exposing directory listings to untrusted networks), the CVSS metrics are accurate and the risk is real.

Exploit ScenarioDerived

An attacker discovers a Mongoose-based embedded web interface with MG_ENABLE_DIRLIST compiled in and crafts a URL containing a percent-encoded XSS payload in the path component, such as /%3Cscript%3Ealert(document.cookie)%3C/script%3E. The attacker distributes the link via phishing email or embeds it in a third-party page; when an authenticated victim clicks the link, the Mongoose server decodes the path, inserts it unescaped into the directory listing page's <title> and <h1> elements, and the injected script executes in the victim's browser under the Mongoose origin, exfiltrating session tokens or submitting authenticated requests on their behalf. No public proof-of-concept exploit is identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Mongoose < 7.22

Affected Packages

euvd mongoose fix: 7.22

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

Vendor (GitHub_M) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Aug 20, 2026 - 18:03 EUVD

DescriptionCVE.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

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Low
niche embedded C library, primarily IoT and firmware deployments
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2025-23061 CRITICAL POC
9.0 Jan 15

Mongoose ODM for Node.js before version 8.9.5 contains a search injection vulnerability when using $where filters with p

CVE-2017-2894 CRITICAL POC
9.8 Nov 07

An exploitable stack buffer overflow vulnerability exists in the MQTT packet parsing functionality of Cesanta Mongoose 6

CVE-2017-2891 CRITICAL POC
9.8 Nov 07

An exploitable use-after-free vulnerability exists in the HTTP server implementation of Cesanta Mongoose 6.8. Rated crit

CVE-2017-2922 CRITICAL POC
9.8 Nov 07

An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.

CVE-2017-2921 CRITICAL POC
9.8 Nov 07

An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.

CVE-2023-3696 CRITICAL POC
9.8 Jul 17

Prototype Pollution in GitHub repository automattic/mongoose prior to 7.3.4. Rated critical severity (CVSS 9.8), this vu

CVE-2022-2564 CRITICAL POC
9.8 Jul 28

Prototype Pollution in GitHub repository automattic/mongoose prior to 6.4.6. Rated critical severity (CVSS 9.8), this vu

CVE-2019-19307 CRITICAL POC
9.8 Nov 26

An integer overflow in parse_mqtt in mongoose.c in Cesanta Mongoose 6.16 allows an attacker to achieve remote DoS (infin

CVE-2024-53900 CRITICAL POC
9.1 Dec 02

Mongoose before 8.8.3 can improperly use $where in match, leading to search injection. Rated critical severity (CVSS 9.1

CVE-2021-26530 CRITICAL POC
9.1 Feb 08

The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 (compiled with OpenSSL support) is vulnerable to remote OO

CVE-2021-26529 CRITICAL POC
9.1 Feb 08

The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 and 6.7-6.18 (compiled with mbedTLS support) is vulnerable

CVE-2021-26528 CRITICAL POC
9.1 Feb 08

The mg_http_serve_file function in Cesanta Mongoose HTTP server 7.0 is vulnerable to remote OOB write attack via connect

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy