CVE-2026-141471: Mongoose: Built-in TLS client accepts a server certificate after issuer signature verification fails
Mongoose is an embedded web server and network library. From 7.17 until 7.24, Mongoose's MGTLSBUILTIN client in src/tlsbuiltin.c can accept an attacker-controlled server certificate chain when configured with a single DER CA certificate and processing a peer-provided chain, because mgtlsverifycertsignature() can return a negative issuer-key parsing result that callers negate as though verification succeeded. A crafted issuer with the trusted CA subject and public-key bytes but an unparseable RSA encoding can pair with an attacker-self-signed leaf that is not signed by the trusted CA, allowing a redirected client connection to complete a TLS 1.3 handshake and exchange application data without the trusted CA private key. This issue is fixed in 7.24.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.24
Event History
Frequently Asked Questions
Which deployments are affected?
Affected deployments use Mongoose versions from 7.17 through 7.23 with the MG_TLS_BUILTIN client, configure trust using a single DER CA certificate, and process a peer-provided certificate chain. The issue is fixed in Mongoose 7.24.
What does an attacker need to exploit this?
The attacker needs to redirect the client connection and present a crafted certificate chain. They can use an attacker-self-signed leaf certificate and do not need the trusted CA's private key.
What is the impact of a successful attack?
A redirected client can complete a TLS 1.3 handshake with the attacker and exchange application data, despite the leaf certificate not being signed by the trusted CA.