CVE-2026-73258: Mongoose multipart header truncation via CR/LF parsing

CVE-2026-73258 · Severity: medium · CVSS 6.5 · Published 2026-08-20

Mongoose is a lightweight, embedded web server used in IoT devices, industrial controllers, and embedded systems. A flaw in its multipart form parsing allows remote attackers to inject lone carriage return or line feed characters that truncate HTTP headers and filenames, potentially causing the application to accept malicious file uploads or content by bypassing Content-Type validation checks.

Quick answers

Is CVE-2026-73258 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-73258 being exploited in the wild.
How severe is CVE-2026-73258?
Medium severity, with a CVSS score of 6.5, published 20 August 2026.
Which products and versions are affected?
Cesanta Mongoose prior to 7.22.
Is there a fix for CVE-2026-73258?
A patch was published on 2026-06-23: Fix merged in version 7.22 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-73258 attacked?
It is attacked over the network.
Am I affected by CVE-2026-73258?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability exists in the mg_http_next_multipart() function in src/http.c, which parses multipart/form-data boundaries and headers. The condition logic used to detect CRLF terminators is incorrect (an AND condition should be OR), causing the parsing loops to halt prematurely when encountering a lone carriage return (\r) or line feed (\n) character. This truncates multipart headers, filenames, or boundary markers, allowing an attacker to craft a multipart request where misleading Content-Type headers mask dangerous payloads. The attack requires only network access and a multipart-capable endpoint; no authentication is required. An attacker can bypass content validation and trick the application into processing dangerous files with incorrect MIME types. The fix is available in Mongoose version 7.22 and later.

Affected products

  • Cesanta Mongoose prior to 7.22

Timeline

  • 2026-08-20: disclosed
  • 2026-06-23: patched: Fix merged in version 7.22

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.