CVE-2026-73260: Mongoose: Out-of-bounds Read via length-counter underflow in built-in TLS X.509 DER parser
Mongoose is an embedded web server and network library. Prior to 7.23, the built-in TLS certificate parser selected by MGTLSBUILTIN fails to verify that a long-form DER element length fits within the remaining certificate buffer. In mgdertotlv() and mgdernext(), a peer-controlled length can advance the parser beyond the certificate and underflow the remaining uint32t length, causing mgtlsparsecertder() to continue walking an invalid pointer. An unauthenticated malicious TLS server, or a client presenting a certificate to a server configured for client certificates, can trigger an out-of-bounds read and denial of service during the handshake. This issue is fixed in version 7.23.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Mongooseto a version that resolves this vulnerability.Fixed in 7.23
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using Mongoose's built-in TLS certificate parser, selected by MG_TLS_BUILTIN, are affected prior to version 7.23. The issue is reachable when the deployment parses a certificate received during a TLS handshake.
What does an attacker need to exploit it?
An attacker needs to provide a malicious DER-encoded certificate during a TLS handshake. This can be an unauthenticated malicious TLS server that a client connects to, or a client presenting a certificate to a server configured to request client certificates.
Is authentication or user interaction required?
No. The supplied vector indicates network reachability with low attack complexity, no privileges, and no user interaction required; the malformed certificate is processed during the handshake.
What is the impact if exploitation succeeds?
The malformed DER length can cause an out-of-bounds read and make the parser continue using an invalid pointer. The stated impact is denial of service during the TLS handshake, with no confidentiality or integrity impact indicated.
What is the remediation?
Upgrade Mongoose to version 7.23, which fixes the certificate-length validation issue. The provided information does not identify an alternative mitigation for deployments that cannot upgrade.