CVE-2026-73253: Mongoose: TLS Hostname Verification Bypass via Overly Permissive Wildcard Matching
Mongoose is an embedded web server and network library. Prior to version 7.22, an on-path network attacker with a wildcard certificate for a parent domain can impersonate deeper subdomains to a client using the built-in TLS stack. The mgtlsverifycertsan() and mgtlsverifycertcn() functions in src/tlsbuiltin.c call mgmatch(), whose wildcard can cross DNS label boundaries, so a pattern such as .example.com can match foo.bar.example.com. The resulting hostname verification bypass permits interception and modification of TLS traffic. This issue is fixed in version 7.22.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Mongooseto a version that resolves this vulnerability.Fixed in 7.22
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Clients using Mongoose's built-in TLS stack in versions before 7.22 are exposed when they connect to deeper subdomains whose hostname is validated against a wildcard certificate for a parent domain.
What does an attacker need to exploit the bypass?
The attacker must be on the network path between the client and server and possess a wildcard certificate for the parent domain. They can then use that certificate to impersonate a deeper subdomain because the affected wildcard matching crosses DNS label boundaries.
What is the impact of successful exploitation?
An attacker can impersonate the intended TLS endpoint, intercept TLS traffic, and modify that traffic.
What should be done if the affected TLS stack is in use?
Upgrade Mongoose to version 7.22, which fixes the hostname verification behavior.