Skip to main content

Cesanta Mongoose CVE-2026-134170

| EUVDEUVD-2026-131888 HIGH
Improper Validation of Array Index (CWE-129)
2026-11-20 VulnCheck GHSA-42fj-ccgp-vcj3
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Connect to Mongoose built-in-TLS endpoint
  2. Delivery
    Present X.509 cert with month '00'
  3. Exploit
    Parser calls mg_timegm() before signature check
  4. Execution
    Unsigned month-1 underflow indexes dm[] out of bounds
  5. Impact
    Process crashes (64-bit DoS) or leaks adjacent memory (32-bit)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Array index validation
Exploitation Conditions

Requires the Mongoose built-in TLS stack (compiled with MG_TLS=1) - builds that use mbedTLS or OpenSSL instead are not affected. The vulnerable instance must actually parse an attacker-controlled X.509 certificate during the TLS handshake: either Mongoose acts as a TLS client connecting to an attacker-controlled server, or as a TLS server configured for mutual/client-certificate authentication (a plain TLS server that does not request client certs does not reach this path). The trigger is a certificate whose UTCTime/GeneralizedTime validity month is encoded as '00' or out of the 1-12 range; DER length/type checks (0x17/0x18, 13/15 bytes) pass, and because parsing happens before signature verification, no CA-signed or otherwise valid certificate is needed and no authentication is required. Limiting factors: impact depends on architecture - 64-bit targets crash (denial of service), whereas 32-bit embedded targets instead suffer an out-of-bounds read that can be used as a memory-disclosure oracle via the accept/reject validity result.

Impact

This is a credible, above-average-priority issue but not an emergency. The only supplied severity score is a CVSS 4.0 base of 8.2 (High) with vector AV:N/AC:H/AT:P/PR:N/UI:N and sole impact VA:H (availability), consistent with a pre-authentication, network-reachable denial of service. The vuln.today decision label is 'this_week', reflecting a serious-but-not-act_now posture. Key signals are MISSING: no EPSS probability is provided, and the CVE is NOT on CISA KEV, so there is no confirmed active exploitation - status is best described as no confirmed in-the-wild use, with a published PoC. The advisory includes a PoC, but it is a standalone program that calls mg_timegm() directly to demonstrate the out-of-bounds read; it is a public PoC reference and is not verified as a working end-to-end network exploit. One conflict to flag: the input CVSS 4.0 vector asserts AC:H, yet the described mechanism is a deterministic unsigned underflow triggered simply by presenting a certificate with month='00' before signature verification - no race, timing, or heap manipulation is described, which argues for low attack complexity (the real constraint is a deployment precondition, better modeled as AT:P). Impact is also platform-dependent: 64-bit targets crash (pure DoS), while 32-bit embedded targets suffer an out-of-bounds READ usable as an information-leak oracle - the latter is confidentiality-relevant but is not reflected in the supplied VC:N. Net: prioritize patching to 7.24 for any build using the built-in TLS stack, but treat active-exploitation risk as unconfirmed rather than imminent.

Exploit ScenarioDerived

A victim running Mongoose with the built-in TLS stack validates an attacker-controlled X.509 certificate during a handshake - either because it acts as a TLS client connecting to a malicious server, or as a TLS server configured for client-certificate (mutual TLS) authentication. The attacker presents a certificate whose validity month field is encoded as '00' (or otherwise out of range); because this is parsed before signature verification, no valid CA-signed certificate is needed, and mg_timegm() indexes dm[] out of bounds, crashing the 64-bit process. A function-level PoC exists in the GHSA advisory; it is not verified as a working network exploit.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 20, 2026

Cesanta Mongoose 7.22 through 7.23 built with its bundled TLS stack (MG_TLS=1) can be crashed, or on 32-bit embedded targets induced to read out-of-bounds memory, by a TLS peer that presents an X.509 certificate whose validity month field is encoded as '00' or another out-of-range value. The malformed month reaches mg_timegm() before signature verification, so no trusted or CA-signed certificate and no authentication are required; the peer only needs to be the server a Mongoose client connects to, or a client presenting a certificate to a Mongoose server configured for client-certificate authentication. On 64-bit builds the result is a denial of service, while 32-bit builds read adjacent memory and can leak information through the certificate accept/reject result; a public PoC reference reproducing the mg_timegm() call exists, but it is not verified as working exploit code, and no confirmed active exploitation has been reported.

RemediationAI

Vendor-released patch: upgrade to Mongoose 7.24, which adds the bounds check 'if (year < 1970 || month == 0 || month > 12) return 0;' in mg_timegm() in src/util.c and the amalgamated mongoose.c (commit 7fccc2b75f64f416ba1c7fd4f5072ae33b44d578, https://github.com/cesanta/mongoose/commit/7fccc2b75f64f416ba1c7fd4f5072ae33b44d578). Teams that cannot immediately move to 7.24 can backport that single condition or rebuild with an external TLS backend (mbedTLS or OpenSSL) instead of MG_TLS=1, which removes the vulnerable asnt2t()/mg_timegm() path entirely - the trade-off is a larger library footprint and a different TLS configuration surface. Deployments acting as TLS servers can also avoid the reachable path by not enabling client-certificate authentication until patched, though that does not protect Mongoose instances acting as TLS clients connecting to untrusted servers, where only upgrading or backporting the check is effective. Confirm the fix by verifying the month range guard is present in the mg_timegm() implementation actually compiled into the firmware or application.

Affected VersionsENISA

Mongoose 7.22 <7.24

Affected Packages

euvd mongoose fix: 7.24

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's built-in TLS implementation parses certificate timestamps in asnt2t() in src/tls_builtin.c, extracting year, month, day and time digits directly from DER bytes. The upstream DER validation only checks the tag (0x17 UTCTime or 0x18 GeneralizedTime) and length (13 or 15 bytes), not the field content, so a string such as "20250015120000Z" passes and yields month = 0. That value is passed unchecked to mg_timegm() in src/util.c, which indexes the static cumulative day-offset table dm[12] as dm[month - 1]; with an unsigned month of 0 the subtraction underflows to 4294967295, producing an out-of-bounds read roughly 4 GB before the array on 32-bit and about 512 GB past it on 64-bit. The advisory classifies this as CWE-125 (out-of-bounds read) while the CVE record uses CWE-129 (improper validation of array index); both describe the same missing 1-12 range check on the month parameter. Because parsing precedes signature verification, the flaw is reachable during the handshake. Only builds using the bundled TLS stack are exposed; builds linked against mbedTLS or OpenSSL do not use this code 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 (VulnCheck) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Deterministic pre-auth trigger via a crafted certificate (AC:L/PR:N/UI:N); dominant impact is a 64-bit process crash (A:H), with no integrity/confidentiality effect in that case, though 32-bit builds additionally leak memory.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Cesanta Mongoose 7.22 before 7.24 with the built-in TLS stack contains an out-of-bounds read in mg_timegm() that allows remote attackers to crash the process via crafted X.509 certificate validity months. Attackers can present a certificate with month '00' or out-of-range values during the handshake, before signature verification, causing an unchecked dm array index and denial of service.

Technical POC Analysis

Unchecked array index leading to an out-of-bounds read.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity vulnerability in Cesanta Mongoose 7.22-7.23 could allow an attacker to crash or leak sensitive memory on 32-bit embedded devices that use the bundled TLS stack, potentially disrupting operations and exposing data. Leadership should prioritize patching internet-facing or critical embedded systems, as the exploitation path requires only a malicious TLS peer and no authentication.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 51% exploitable
Prevalence
Medium
popular embedded networking library, but only built-in TLS (MG_TLS=1) builds are affected
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

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 HIGH
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
No
Human Impact
High

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +41
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.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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