Skip to main content

Mongoose EUVDEUVD-2026-117180

| CVE-2026-115473 MEDIUM
Out-of-bounds Read (CWE-125)
2026-11-04 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Send HTTP request with short path (./.)
  2. Exploit
    Reach mg_http_upload or serve_dir
  3. Execution
    Trigger OOB read in mg_path_is_sane
  4. Impact
    Leak adjacent heap byte or crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The affected application must call the public API functions mg_http_upload or mg_http_serve_dir (both documented in mongoose.h); any app using them inherits the bug. Exploitation is unauthenticated and remote (PR:N): the attacker supplies a request whose path has one of the specific short shapes - length-1 '.' (reaches Bug A in mg_http_upload), or two trailing bytes '/.' as in '/.' or 'x/.' (Bug B, reachable from both serve_dir and upload) - causing a 1-byte read past the mg_str buffer. Limiting factors: no code execution or integrity impact; the information-disclosure outcome is realistic only on bare-metal/RTOS targets lacking memory protection where the adjacent byte can leak or alter the sane/insane decision, whereas on memory-protected hosts the over-read is usually benign and only produces a crash under instrumented (e.g. ASAN) builds. Versions <= 7.21 are affected; 7.22 fixes it.

Impact

Signals are mostly consistent and point to a genuine but moderate-priority issue. The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L, base 6.5) indicates remote, low-complexity, unauthenticated reachability - PR:N confirms no authentication is required - but with only Low confidentiality and Low availability impact and no integrity impact, matching the one-byte heap out-of-bounds read described. There is no KEV listing and no EPSS score in the supplied data, so widespread or active exploitation is neither confirmed nor estimable from these inputs. A concrete PoC exists (a self-contained Docker/AddressSanitizer reproducer confirmed against Mongoose 7.21), which raises practical reproducibility, but it demonstrates ASAN-detected OOB-read crashes rather than data exfiltration or code execution. The vuln.today decision label is 'this_month', not act_now or emergency, consistent with a real-but-not-critical finding. Importantly, the real-world impact is conditional: the GHSA states meaningful information disclosure occurs on bare-metal/RTOS targets without memory protection, while on hosts with memory protection the one-byte over-read is typically benign and only crashes under instrumentation - so the Low confidentiality rating may overstate impact for most server-class deployments and understate it for unprotected embedded targets. Net: a legitimate patch-this-month issue for embedded users, not a high-urgency emergency.

Exploit ScenarioDerived

An unauthenticated remote attacker sends an HTTP request containing a specially short path shape (e.g. '.', '/.', or 'x/.') to an application that exposes mg_http_upload or mg_http_serve_dir, causing mg_path_is_sane to read one byte past the path buffer. On an embedded bare-metal/RTOS target without memory protection this can leak the adjacent heap byte or flip the path accept/reject decision; on instrumented builds it crashes. A working PoC reproducer (Docker + AddressSanitizer against 7.21) is publicly referenced in the GHSA advisory.

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

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

Alert me

AnalysisAIv1 – Nov 04, 2026

Heap out-of-bounds reads in the mg_path_is_sane() path validator of Cesanta Mongoose through 7.21 let unauthenticated remote requests read one byte past the end of a heap buffer, because the function checks path.buf[1] and s[2] without first confirming two or three bytes remain. Any application exposing mg_http_upload() or mg_http_serve_dir() inherits the flaw; a request whose path is a bare '.' or ends in '/.' (for example '/.', 'x/.' or '/upload?file=.') reaches the over-read, which on bare-metal or RTOS targets without memory protection can leak an adjacent heap byte or flip the sane/insane decision, while on memory-protected hosts the result is usually benign and crashes only under instrumented builds such as ASAN. A public PoC reference exists in the form of a self-contained ASAN Docker reproducer confirming the over-read against 7.21; it is not verified as working exploit code, and no active exploitation (CISA KEV) or public exploit tooling is reported. Fix is released in 7.22.

RemediationAI

Vendor-released patch: Mongoose 7.22 (release tag https://github.com/cesanta/mongoose/releases/tag/7.22, fixing commit https://github.com/cesanta/mongoose/commit/b55de8b151d1466a3e41d1f854f22eeb6faa23dc, advisory https://github.com/cesanta/mongoose/security/advisories/GHSA-cjmx-764f-286c). Upgrade the vendored mongoose.c/mongoose.h pair to the 7.22 sources - because the library is embedded, this means rebuilding and reflashing firmware, so plan a maintenance window; note the patched function also newly rejects paths containing an embedded NUL and treats empty paths as sane, which is a behavior change worth re-running path-handling tests against. Where an upgrade cannot be staged immediately, the advisory's suggested code fix can be back-ported by hand into mg_path_is_sane: guard the buf[1] access with len >= 2, tighten the loop guard so s[2] is only read when n >= 3, and reject len == 0 up front; the trade-off is a locally maintained patch that must be re-applied on every future library update. Applications that do not call mg_http_upload or mg_http_serve_dir do not expose the vulnerable paths and can schedule the update with normal maintenance; there is no vendor-provided configuration switch that disables the affected code path.

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 is an embedded HTTP/network library for C, and its path sanity check lives in src/util.c as mg_path_is_sane(const struct mg_str path), operating on the library's mg_str type - a (buf, len) pair that is not guaranteed to be NUL-terminated and whose length is attacker-influenced through the parsed request path. The flaw is CWE-125 (out-of-bounds read) and exists in two variants. Bug A at the second byte check reads path.buf[1] to detect a leading '..' without verifying path.len >= 2, so a one-byte path '.' produces a one-byte over-read. Bug B inside the loop guard checks only n >= 2 before the body dereferences s[2] to detect a '/..' subdirectory, so when exactly two bytes remain ('/.') the third byte is read past the end of the mg_str region. Both are reachable from the documented public API: mg_http_serve_dir (http.c:806, constructed via mg_str_n(path, path_size)) exercises Bug B, and mg_http_upload (http.c:963, via mg_str(file)) exercises both. The root cause is a mismatch between the length checks and the bytes actually dereferenced, compounded by the loop's assumption that a NUL terminator or padding exists beyond len. The upstream commit b55de8b151d1466a3e41d1f854f22eeb6faa23dc rewrites the function to short-circuit on n == 0 or an empty string, guard the second byte with n > 1, require n > 2 before touching s[2], and additionally reject paths containing an embedded NUL (n > 0 after the loop), with regression tests using mg_str_n on 1-, 2- and 3-byte buffers. There is no write primitive and no integrity path: exposure is the single adjacent heap byte and the possibility that it changes the accept/reject decision for the path.

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 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
vuln.today AI 6.5 MEDIUM

Unauthenticated remote request reaches the parser (AV:N/AC:L/PR:N/UI:N); a 1-byte OOB read gives limited info disclosure (C:L) and possible crash (A:L), no integrity impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
Red Hat 6.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Nov 04, 2026 - 23:02 EUVD

DescriptionCVE.org

Mongoose is an embedded web server and network library. Prior to 7.22, mg_path_is_sane in src/util.c read path.buf[1] without first requiring path.len to be at least two and read s[2] when only two bytes remained. Unauthenticated remote requests reaching mg_http_upload or mg_http_serve_dir with the affected short path shapes could therefore trigger one-byte heap out-of-bounds reads. On bare-metal or RTOS targets without memory protection, the adjacent byte could be exposed or influence whether a path was accepted, and instrumented builds could crash. This issue is fixed in version 7.22.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
popular embedded web server/network library in IoT and embedded devices
Social Media
1
Sightings
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.3%
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· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

Vendor StatusVendor

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