Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP POST with crafted multipart body
-
DeliveryInsert lone CR or LF before Content-Type value
-
ExploitTrigger premature loop exit in mg_http_next_multipart()
-
ExecutionReceive truncated/spoofed Content-Type from parser
-
PersistBypass application file-type or content validation
-
ImpactUpload disallowed or malicious content
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrect comparison
|
| Exploitation Conditions | Exploitation requires that the target application built on Mongoose exposes an HTTP endpoint that processes multipart/form-data input using mg_http_next_multipart(), which is a standard pattern for any file upload feature. No authentication is required per the CVSS vector (PR:N), and no special non-default Mongoose configuration is needed - multipart processing is part of the library's core HTTP handling. The primary factor limiting impact is that the vulnerability produces content-type spoofing and header truncation rather than direct memory corruption or code execution; practical harm depends on whether the embedding application makes security-relevant decisions (file type gating, content filtering) based on the parser's output. Only Mongoose versions prior to 7.22 are affected; version 7.22 and later correctly require the full two-byte CRLF sequence for loop termination. |
| Impact | The CVSS 6.5 score with vector AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N reflects genuine unauthenticated network exploitability at low attack complexity, which is an accurate characterization of the threat surface: any HTTP endpoint that accepts multipart/form-data is reachable without credentials. No EPSS data was included in the source intelligence, and the vulnerability does not appear in the CISA KEV catalog, so no confirmed active exploitation can be stated. The practical impact is bounded - the vulnerability enables content-type spoofing and header truncation rather than direct code execution or data exfiltration, meaning harm depends on how the embedding application uses the parser output. The C:L and I:L ratings are reasonable given that a spoofed Content-Type could enable upload of disallowed file types or injection of crafted content, while the absence of A impact is consistent with no crash or denial-of-service path being described. This is a real patching priority for any embedded application processing file uploads, but the lack of exploit code and KEV listing suggests it is not currently being mass-targeted. |
| Exploit ScenarioDerived | An unauthenticated remote attacker sends an HTTP POST request to a Mongoose-hosted file upload endpoint with a crafted multipart body containing a lone carriage return positioned before the actual Content-Type header value. The premature loop termination in mg_http_next_multipart() causes the parser to return a truncated or spoofed Content-Type, leading the application to classify the upload as an innocuous type such as text/plain when the actual content is an executable script, bypassing upload validation logic. No public proof-of-concept has been identified, but the attack requires only standard HTTP tooling and knowledge of multipart encoding. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
Multipart body parsing in Cesanta Mongoose before 7.22 can be manipulated by a remote unauthenticated attacker to truncate headers, filenames, or boundary values through injection of a lone carriage return or line feed. The logic error in mg_http_next_multipart() causes CRLF-scanning loops to terminate prematurely on any single CR or LF character rather than requiring the full two-byte CRLF sequence, enabling content-type spoofing that can cause downstream application logic to accept dangerous or disallowed content. No CISA KEV listing or public proof-of-concept has been identified at time of analysis; the fix is confirmed in release 7.22.
RemediationAI
Upgrade Cesanta Mongoose to version 7.22 or later, which contains the corrected CRLF detection logic in both affected loops within mg_http_next_multipart(). The release is available at https://github.com/cesanta/mongoose/releases/tag/7.22 and the specific fix is in commit a9df523f76f43a38bd53b4232b9cfd4c16869e71 via PR #3611. For deployments that cannot immediately upgrade, a compensating control is to reject multipart request bodies containing bare CR or LF characters at an upstream layer - for example, in a reverse proxy or WAF rule - before they reach the Mongoose parser; note that this filtering must be applied carefully to avoid breaking legitimate CRLF-terminated multipart boundaries. Alternatively, disable multipart form-data processing endpoints entirely if file upload functionality is not required by the application.
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
Cesanta Mongoose is a single-file embedded C web server and networking library (CPE: cpe:2.3:a:cesanta:mongoose:*:*:*:*:*:*:*:*) widely used in IoT firmware, embedded appliances, and commercial products. The vulnerability is classified under CWE-697 (Incorrect Comparison). Two while loops inside mg_http_next_multipart() in src/http.c (compiled into mongoose.c) used the condition 's[b] != \r && s[b + 1] != \n', which - by De Morgan's law - halts scanning when either character independently resembles part of a CRLF sequence. The corrected logic '!(s[b] \r && s[b + 1] \n)' requires both characters to form the complete two-byte CRLF terminator before stopping. A crafted multipart body containing a lone CR or LF can therefore force early loop termination, causing boundary or header text to be truncated mid-value. The patch in PR #3611 (commit a9df523f76f43a38bd53b4232b9cfd4c16869e71) applies this fix to both affected loops.
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:N/S:U/C:L/I:L/A:N
Multipart endpoint is network-reachable without credentials or interaction; impact is limited to content-type spoofing with no code execution or availability loss.
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 place a lone carriage return or line feed in multipart input processed by mg_http_next_multipart() in src/http.c. The loops comparing s[b] and s[b + 1], and s[h2] and s[h2 + 1], use an incorrect AND condition and stop when either character resembles part of a CRLF terminator. This truncates headers, filenames, or boundaries and can cause an application to accept dangerous content after seeing a misleading Content-Type value. 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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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-63495
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB