Vulnerability DatabaseCVE-2026-134170

CVE-2026-134170: 
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2026-134170 is an out-of-bounds read vulnerability in Cesanta Mongoose's built-in TLS stack, specifically in the mg_timegm() function, that allows unauthenticated remote attackers to crash the process or leak memory via a crafted X.509 certificate. It affects Mongoose versions 7.22 through 7.23 (fixed in 7.24). The vulnerability was disclosed on November 20, 2026, with a CVSS v3.1 score of 5.9 (Medium) and a CVSS v4.0 score of 8.2 (High) (GitHub Advisory, Feedly).

Technical details

The root cause is an improper validation of array index (CWE-129 / CWE-125) in mg_timegm() within src/util.c. The function accesses a static 12-element dm[] array using the expression dm[month - 1] without first validating that month is in the range 1–12. When month = 0, the subtraction underflows to 4294967295 (unsigned 32-bit), causing an out-of-bounds read far outside the array bounds — approximately 512 GB past the array on 64-bit systems, or 4 GB before it on 32-bit. The vulnerable call path originates in asnt2t() in src/tls_builtin.c, which parses X.509 certificate validity timestamps from DER-encoded bytes during the TLS handshake without validating the month value before passing it to mg_timegm(). DER validation only checks the type tag and length of the timestamp field, not the content, so a certificate with timestamp "20250015120000Z" (month=00) passes all upstream checks and reaches the vulnerable code before signature verification occurs (GitHub Advisory, util.c source, tls_builtin.c source).

Impact

On 64-bit systems, exploitation causes an immediate process crash (denial of service) due to an invalid memory access far outside the process address space. On 32-bit embedded targets — a common deployment environment for Mongoose — the out-of-bounds read accesses memory at a predictable offset relative to the dm[] array, enabling an information leak: the return value of mg_timegm() feeds into certificate validity checks, allowing an attacker to use different month values as an oracle to probe adjacent memory contents. No authentication is required, and the attack occurs before certificate signature verification, meaning any network-reachable Mongoose instance using the built-in TLS stack (MG_TLS=1) is exposed (GitHub Advisory).

Exploitability

A proof-of-concept (PoC) C program is publicly available in the Cesanta security advisory, demonstrating the out-of-bounds read by calling mg_timegm(2025, 0, 15, 12, 0, 0) and reproducing a crash under ASAN. The PoC demonstrates the vulnerable function in isolation; the full network-reachable attack path (presenting a crafted certificate during TLS handshake) is described in the advisory but not implemented in the provided code. There is no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.59%, and the vulnerability is not listed in the CISA KEV catalog (GitHub Advisory, Feedly).

Exploitation steps

  1. Identify target: Locate network-accessible services built with Cesanta Mongoose 7.22–7.23 using the built-in TLS stack (MG_TLS=1). These are commonly embedded devices, IoT endpoints, or custom servers.
  2. Craft malicious X.509 certificate: Generate a self-signed X.509 certificate with an invalid validity timestamp where the month field is 00, e.g., "20250015120000Z". This passes DER type and length checks but contains an out-of-range month value.
  3. Initiate TLS handshake: Connect to the target server and present the crafted certificate during the TLS handshake (e.g., as a client certificate in mutual TLS, or as a server certificate if acting as a rogue server to a Mongoose client).
  4. Trigger out-of-bounds read: The asnt2t() function in tls_builtin.c parses the month bytes directly from the certificate without range validation and passes month=0 to mg_timegm(), causing dm[0 - 1] to underflow and read out-of-bounds memory.
  5. Achieve impact: On 64-bit targets, the process crashes immediately (DoS). On 32-bit targets, the return value leaks 2 bytes of adjacent memory, which can be used as an oracle by repeating with different month values (GitHub Advisory).

Indicators of compromise

  • Network: Repeated TLS handshake attempts from the same source IP that do not complete successfully; connections presenting certificates with malformed or zero-value month fields in validity timestamps.
  • Logs: Application or system logs showing unexpected process crashes or restarts of the Mongoose-based service; TLS handshake errors logged immediately after certificate parsing.
  • Process: Unexpected termination (SIGSEGV or SIGBUS) of the Mongoose process, particularly on 64-bit systems; core dumps referencing mg_timegm() or asnt2t() in the stack trace.
  • File System: Core dump files generated in the working directory of the Mongoose process following crash events (GitHub Advisory).

Mitigation and workarounds

Upgrade Cesanta Mongoose to version 7.24 or later, which includes a fix for certificate timestamp validation in the built-in TLS stack (Mongoose 7.24 Release). The fix commit is available at 7fccc2b75f64f416ba1c7fd4f5072ae33b44d578. If immediate patching is not possible, implement network-level controls to restrict TLS handshake traffic from untrusted or unknown sources, and monitor for unexpected process crashes that may indicate exploitation attempts. Alternatively, applications that do not require the built-in TLS stack can use an external TLS library (e.g., mbedTLS) to avoid the vulnerable code path (GitHub Advisory).

Community reactions

The vulnerability was credited to researchers the-red-ace and allanvictor in the official Cesanta security advisory. The advisory was published by Cesanta maintainer scaprile on November 20, 2026. Social media activity was observed on Mastodon (infosec.exchange) and Bluesky shortly after disclosure, consistent with routine CVE notification bots. No significant independent researcher commentary or major media coverage has been identified beyond standard vulnerability tracking platforms (GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

sid

mongoose: 7.24+ds-1

Fixed

Source: This report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-134170HIGH8.2
  • Linux Debian logoLinux Debian
  • mongoose
NoNoNov 20, 2026
CVE-2026-134043HIGH7.8
  • Linux Debian logoLinux Debian
  • krita
NoNoNov 20, 2026
CVE-2026-134042HIGH7.8
  • Linux Debian logoLinux Debian
  • krita
NoNoNov 20, 2026
CVE-2026-134041HIGH7.8
  • Linux Debian logoLinux Debian
  • krita
NoNoNov 20, 2026
CVE-2026-134171MEDIUM6.9
  • Linux Debian logoLinux Debian
  • mongoose
NoNoNov 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management