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 mg_tls_verify_cert_san() and mg_tls_verify_cert_cn() functions in src/tls_builtin.c call mg_match(), 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.
Security readout for executives and security teams
Plain-English summary
Mongoose versions before 7.22 may trust a TLS certificate for the wrong hostname. An attacker positioned between a device and server could use a parent-domain wildcard certificate to impersonate a deeper subdomain, exposing or altering encrypted communications.
Executive priority
Treat this as an urgent confidentiality and integrity issue for affected client deployments. Quickly identify pre-7.22 embedded copies and schedule upgrades, prioritizing sensitive communications and devices on untrusted networks. The critical rating warrants prompt action, although exploitation depends on both network position and certificate access.
Technical view
The built-in TLS verifier passes certificate SAN and common-name patterns to mg_match(). Its wildcard matching crosses DNS label boundaries, allowing *.example.com to match foo.bar.example.com. This violates expected hostname validation and enables confidentiality and integrity compromise under the stated on-path and certificate conditions. Version 7.22 fixes the issue.
Likely exposure
Exposure is limited to Mongoose versions earlier than 7.22 using the built-in TLS stack for outbound connections. Risk is greatest where clients connect to deeper subdomains and an attacker could obtain a relevant parent-domain wildcard certificate and intercept network traffic. The sources do not quantify deployment prevalence.
Exploitation context
Exploitation requires an on-path network position and a wildcard certificate for the relevant parent domain. No user interaction or privileges are required. The supplied record does not report active exploitation, and KEV is false. Public proof-of-concept availability is not established by the supplied sources.
Researcher notes
The affected paths are mg_tls_verify_cert_san() and mg_tls_verify_cert_cn() in src/tls_builtin.c. Both relied on mg_match(), whose wildcard semantics could span DNS labels. Review the 7.22 change and regression coverage for SAN and common-name handling. The supplied evidence supports the bypass and fix, but not observed exploitation prevalence.
Mitigation direction
Upgrade Mongoose to version 7.22 or later.
Identify statically linked, vendored, or firmware-embedded Mongoose copies that package managers may miss.
Prioritize internet-facing clients and devices operating across untrusted or interceptable networks.
Review the vendor advisory before relying on any temporary workaround.
Validation and detection
Inventory Mongoose versions and confirm whether each deployment uses the built-in TLS stack.
Check source and binaries for vendored Mongoose releases earlier than 7.22.
Verify wildcard certificates cannot validate hostnames containing additional DNS labels after upgrading.
Run existing TLS connection and certificate-validation regression tests against version 7.22.
Confirm deployed firmware or application artifacts contain the updated library, not only build manifests.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-295: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-295 · source CWE mapping
Improper Certificate Validation
Improper Certificate Validation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.