Vulnerability DatabaseCVE-2026-141471

CVE-2026-141471: 
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-141471 is a TLS certificate validation bypass vulnerability in Cesanta Mongoose, an embedded web server and network library. The flaw exists in the MG_TLS_BUILTIN client implementation (src/tls_builtin.c) in versions 7.17 through 7.23, where mg_tls_verify_cert_signature() can return -1 on RSA key parsing failure, and callers negate this value (via !) as though verification succeeded. This allows an attacker to present a forged certificate chain that the client accepts, completing a TLS 1.3 handshake without possessing the trusted CA's private key. The vulnerability was published on December 1, 2026, and is fixed in version 7.24. It carries a CVSS v4.0 base score of 9.1 (Critical) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is CWE-295 (Improper Certificate Validation): in src/tls_builtin.c, the certificate-chain verification logic uses the boolean expression !mg_tls_verify_cert_signature(...). When the function encounters an unparseable RSA public key in the issuer certificate, it returns -1 (an error code); in C, !(-1) evaluates to false (0), but the surrounding logic treats this as a non-rejection, effectively accepting the chain. An attacker crafts an issuer certificate that carries the trusted CA's subject and public-key bytes but with an intentionally malformed RSA encoding, paired with an attacker-self-signed leaf certificate not signed by the trusted CA. The attack requires a network position to redirect or intercept the client's outbound TLS connection (e.g., via DNS manipulation or network path control), and the target must be configured with a single DER CA certificate using MG_TLS_BUILTIN. The fix, committed in ca5ca34, changes mg_tls_verify_cert_signature() to return bool and ensures all error paths return false rather than -1 (GitHub Advisory, Fix Commit).

Impact

Successful exploitation allows an unauthenticated network attacker to impersonate a trusted server to a Mongoose TLS client, completing a full TLS 1.3 handshake and exchanging application data without possessing the trusted CA's private key. This results in high confidentiality and integrity impact: the client may transmit sensitive application data (credentials, API keys, commands) to the attacker-controlled endpoint, and the attacker can return crafted responses that the client trusts. Availability is not directly impacted, but the bypass undermines the entire trust model of TLS-protected communications for affected Mongoose deployments (GitHub Advisory, Feedly).

Exploitability

A proof-of-concept is included in the GitHub Security Advisory, demonstrating a successful loopback TLS 1.3 handshake and HTTP data exchange using an attacker-generated leaf key and a crafted fake RSA issuer certificate (fake-rsa-issuer.der), without using the trusted CA's private key. There is no evidence of in-the-wild exploitation or threat actor attribution at this time. The EPSS score is 0.343%, reflecting low but non-negligible exploitation probability. The vulnerability is not currently listed in the CISA KEV catalog. Exploitation requires a network position to redirect the client's connection (e.g., DNS poisoning, ARP spoofing, or BGP hijacking), limiting opportunistic mass exploitation (GitHub Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify applications using Cesanta Mongoose versions 7.17–7.23 with MG_TLS_BUILTIN configured and a single DER CA certificate for TLS client authentication.
  2. Craft the fake issuer certificate: Create a DER-encoded certificate that copies the trusted CA's subject and public-key bytes but encodes the RSA key in an intentionally unparseable format (e.g., malformed DER structure for the RSA modulus/exponent). This is the fake-rsa-issuer.der artifact.
  3. Generate attacker leaf certificate: Use OpenSSL to generate a self-signed leaf certificate with an attacker-controlled EC private key, setting the appropriate SANs and key usage extensions: openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -sha256 -keyout attacker.key -out attacker-leaf.pem -days 3650 -subj "/CN=Mongoose" -addext "subjectAltName=DNS:localhost".
  4. Assemble the forged chain: Concatenate the attacker leaf and fake issuer into a PEM chain: cat attacker-leaf.pem fake-rsa-issuer.pem > attacker-chain.pem.
  5. Redirect the client connection: Use DNS poisoning, ARP spoofing, BGP hijacking, or control of the configured endpoint to redirect the Mongoose client's outbound TLS connection to an attacker-controlled server.
  6. Serve the forged chain: Configure the attacker's server to present attacker-chain.pem and attacker.key during the TLS 1.3 handshake.
  7. Exploit the verification bug: The Mongoose client calls mg_tls_verify_cert_signature() on the fake issuer; the function returns -1 due to RSA parse failure; !(-1) is false in C but the chain is accepted due to the logic flaw, completing the handshake.
  8. Intercept application data: The client sends its HTTP request (or other application data) to the attacker's server, which can read, modify, or respond with crafted data (GitHub Advisory).

Indicators of compromise

  • Network: Unexpected TLS 1.3 handshakes completing to IP addresses not matching the configured server's expected endpoints; outbound connections from Mongoose-based devices to unfamiliar IPs on TLS ports (443, 8883, etc.).
  • Network: DNS responses for configured server hostnames resolving to unexpected IP addresses (indicative of DNS poisoning used to redirect connections).
  • Logs: Mongoose application logs showing MG_ERROR: failed to parse RSA issuer public key followed by a successful TLS handshake completion — this combination indicates the vulnerability was triggered (pre-patch behavior).
  • Logs: TLS handshake completions with certificate chains where the issuer certificate's RSA public key cannot be validated by standard tools (e.g., openssl verify fails on the presented chain).
  • File System: Presence of fake-rsa-issuer.der or similarly malformed DER certificate files on attacker infrastructure (if accessible).
  • Process: Mongoose client processes exchanging application data with endpoints whose TLS certificates do not chain to the configured trusted CA when verified externally (GitHub Advisory).

Mitigation and workarounds

The primary remediation is to upgrade Cesanta Mongoose to version 7.24 or later, which changes mg_tls_verify_cert_signature() to return bool and ensures all error paths (including RSA key parse failures) return false, preventing the sign-negation bypass (Fix Commit, Release Notes). No configuration-based workaround is available for the library-level flaw; however, organizations unable to upgrade immediately should prioritize network-level controls to prevent connection redirection (e.g., enforcing DNS security, network segmentation, and monitoring for unexpected TLS endpoints). Applications using external TLS libraries (not MG_TLS_BUILTIN) are not affected by this specific vulnerability.

Community reactions

Red Hat tracked the vulnerability via Bugzilla (Bug 2588258) and published a CVE advisory, indicating relevance to their product ecosystem (Red Hat Bugzilla, Red Hat Advisory). The Ostorlab security blog published a technical analysis of the vulnerability (Ostorlab Blog). The vulnerability was noted on Bluesky by CVE tracking accounts shortly after disclosure, and Cloudflare Radar indexed it for monitoring. Community reaction has been moderate given the constrained attack preconditions (requiring network redirection capability), but the high CVSS score and presence of a working PoC in the advisory have drawn attention from embedded systems security practitioners.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Ubuntu

Unknown

devel

mongoose

Not Affected

Source: This report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-141471CRITICAL9.1
  • NixOS logoNixOS
  • mongoose
NoYesDec 01, 2026
CVE-2026-141511HIGH8.7
  • NixOS logoNixOS
  • mongoose-lib
NoYesDec 01, 2026
CVE-2026-141472HIGH8.7
  • NixOS logoNixOS
  • mongoose
NoYesDec 01, 2026
CVE-2026-141510MEDIUM5.9
  • NixOS logoNixOS
  • mongoose
NoYesDec 01, 2026
CVE-2026-142248LOW2.3
  • NixOS logoNixOS
  • mlflow
NoNoDec 02, 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