Skip to main content

Mongoose EUVDEUVD-2026-63495

| CVE-2026-73258 MEDIUM
Incorrect Comparison (CWE-697)
2026-08-20 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 POST with crafted multipart body
  2. Delivery
    Insert lone CR or LF before Content-Type value
  3. Exploit
    Trigger premature loop exit in mg_http_next_multipart()
  4. Execution
    Receive truncated/spoofed Content-Type from parser
  5. Persist
    Bypass application file-type or content validation
  6. Impact
    Upload 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.

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

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

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

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

Multipart endpoint is network-reachable without credentials or interaction; impact is limited to content-type spoofing with no code execution or availability loss.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/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
None
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 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

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Medium
embedded C networking library used across IoT firmware and commercial devices
Data Quality
7 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
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

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

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

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