Description
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.
Published: 2026-08-20
Score: 6.5 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A logic error in the multipart parsing routine caused by the incorrect AND operator in mg_http_next_multipart() allows an attacker to insert a solitary carriage return or line feed into a multipart request. The loops that compare characters stop prematurely when either position matches part of a CRLF terminator, truncating headers, filenames, or boundary delimiters. As a result the application may accept data whose Content-Type header has been manipulated, effectively bypassing defenses that rely on correct header parsing. This vulnerability is identified as CWE‑697, an incorrect logical operator condition.

Affected Systems

The flaw exists in the Cesanta Mongoose embedded web server and network library in all versions released prior to 7.22. Applications that embed or link against these older versions can be exposed to the validation bypass. The affected releases include 7.21 and earlier.

Risk and Exploitability

The impact score is 6.5, indicating a moderate severity. The EPSS score is currently unavailable, and the issue is not listed in CISA’s Known Exploited Vulnerabilities catalog, suggesting no widespread exploitation to date. The vulnerability is remotely exploitable over HTTP, requiring the ability to send a crafted multipart payload. While it does not directly lead to denial of service or immediate code execution, the ability to inject malicious content can aid in other attacks, making it a noteworthy concern for systems handling untrusted input.

Generated by OpenCVE AI on August 20, 2026 at 19:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the upstream patch or upgrade Mongoose to version 7.22 or later
  • If an upgrade is not feasible, apply the commit at https://github.com/cesanta/mongoose/commit/a9df523f76f43a38bd53b4232b9cfd4c16869e71 or merge pull request 3611 to address the logic error
  • While awaiting a patch, enforce strict validation of multipart boundaries and reject requests containing lone CR or LF characters before they reach application logic

Generated by OpenCVE AI on August 20, 2026 at 19:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 20 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 20 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Cesanta
Cesanta mongoose
Vendors & Products Cesanta
Cesanta mongoose

Thu, 20 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Mongoose: Multipart boundary/header scan logic error in mg_http_next_multipart
Weaknesses CWE-697
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'}


Subscriptions

Cesanta Mongoose
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-20T18:32:51.938Z

Reserved: 2026-08-11T17:18:01.598Z

Link: CVE-2026-73258

cve-icon Vulnrichment

Updated: 2026-08-20T18:32:31.266Z

cve-icon NVD

Status : Received

Published: 2026-08-20T18:16:47.323

Modified: 2026-08-20T19:17:01.313

Link: CVE-2026-73258

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T18:30:03Z

Weaknesses