Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain on-path network position
-
DeliveryPresent parent-domain wildcard cert during TLS handshake
-
Exploitmg_match() matches across DNS labels
-
ExecutionCertificate verification bypassed
-
ImpactIntercept and modify TLS traffic
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
|
| Exploitation Conditions | Exploitation requires three concrete conditions: (1) the target must be built with and using Mongoose's built-in TLS stack (src/tls_builtin.c) as a TLS client that performs hostname verification via mg_tls_verify_cert_san()/mg_tls_verify_cert_cn(); (2) the attacker must occupy an on-path/man-in-the-middle network position between client and server (reflected as AT:P in the CVSS 4.0 vector); and (3) the attacker must possess a valid wildcard certificate for a PARENT domain of the target host (e.g., a cert for *.example.com to impersonate foo.bar.example.com). No authentication to the application is needed (PR:N) and no user interaction is required (UI:N). Limiting factors: deployments using mbedTLS/OpenSSL backends are not affected, and the wildcard-cert-plus-on-path requirement prevents opportunistic remote exploitation. |
| Impact | The vendor CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H, base 9.1) correctly captures both the high confidentiality and integrity impact (traffic interception and modification) and the key precondition: AT:P (Attack Requirements: Present) reflects that the attacker must already be on-path AND possess a valid wildcard certificate for a parent domain - a meaningful barrier not visible in the headline 9.1. There is no EPSS score, KEV listing, or POC in the provided data, so real-world exploitation is currently unproven; this is a capability-gated MitM issue rather than a mass-scannable RCE. Practical risk concentrates in scenarios where an adversary can position on-path (hostile network, compromised router, malicious Wi-Fi) and can obtain or already controls a wildcard cert for the target's parent domain. Note the 9.1 is arguably inflated for typical deployments given the on-path plus wildcard-cert prerequisites - verify applicability against your own network exposure before treating as a drop-everything item. |
| Exploit ScenarioDerived | An attacker in an on-path position (e.g., a rogue access point or compromised upstream router) who holds a legitimate wildcard certificate for *.example.com intercepts a Mongoose client's TLS connection to secure.internal.example.com. Mongoose's built-in verifier accepts the wildcard cert even though it should not span the extra label, so the attacker terminates and re-originates the session, reading and altering the traffic transparently. No public exploit is identified at time of analysis, though the flaw is straightforward to trigger given the prerequisites. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 20, 2026
TLS hostname verification bypass in Cesanta Mongoose's built-in TLS stack (versions prior to 7.22) lets an on-path attacker holding a wildcard certificate for a parent domain impersonate arbitrarily deep subdomains, defeating certificate validation for clients that use the embedded TLS backend. The flaw stems from mg_match() wildcards crossing DNS label boundaries, so *.example.com wrongly matches foo.bar.example.com. A vendor patch exists in 7.22, but no public exploit identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade to Mongoose 7.22 (https://github.com/cesanta/mongoose/releases/tag/7.22), which fixes the label-boundary matching per PR #3611 and commit a9df523f76f43a38bd53b4232b9cfd4c16869e71. Because Mongoose is typically statically compiled into firmware, this requires rebuilding and reflashing/redeploying affected devices, not a simple package bump. If you cannot upgrade immediately, compensating options include switching the TLS backend to mbedTLS or OpenSSL (MG_TLS build option), which avoids the vulnerable built-in verifier at the cost of larger binary size and added dependencies; or, where you control the PKI, avoiding issuance of wildcard certificates for parent domains and pinning exact leaf certificates so cross-label matches cannot help an attacker. Review the advisory GHSA-jp6g-796f-39vp for exact guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Mongoose is a widely embedded C web server and networking library (single-file mongoose.c) commonly compiled into IoT, industrial, and appliance firmware. The vulnerability lives in Mongoose's optional built-in TLS implementation (src/tls_builtin.c), not in mbedTLS/OpenSSL backends. During peer certificate validation, mg_tls_verify_cert_san() and mg_tls_verify_cert_cn() delegate wildcard matching to the general-purpose mg_match() helper. Because mg_match()'s '*' glob is not DNS-label-aware, it matches across dots, so a single-label wildcard pattern illegitimately spans multiple labels. This is a classic CWE-295 (Improper Certificate Validation) root cause: the hostname-to-certificate comparison does not enforce RFC 6125 label-boundary rules.
Know when Mongoose gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
AC:H because the attacker must be on-path and hold a valid parent-domain wildcard certificate; PR:N/UI:N as no app auth or user action is needed; C:H/I:H for traffic interception and modification, A:N.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
Cesanta Mongoose, a widely-used embedded TLS stack for IoT and edge devices, contains a certificate validation flaw affecting all versions prior to 7.22 that allows network attackers to intercept and impersonate encrypted communications. Organizations deploying Mongoose for secure client connections-particularly in industrial control systems, medical devices, or other connected infrastructure-face immediate risk of credential theft, unauthorized command injection, and data exfiltration. This requires emergency patching to restore cryptographic trust boundaries.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Mongoose ODM for Node.js before version 8.9.5 contains a search injection vulnerability when using $where filters with p
An exploitable stack buffer overflow vulnerability exists in the MQTT packet parsing functionality of Cesanta Mongoose 6
An exploitable use-after-free vulnerability exists in the HTTP server implementation of Cesanta Mongoose 6.8. Rated crit
An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.
An exploitable memory corruption vulnerability exists in the Websocket protocol implementation of Cesanta Mongoose 6.8.
Prototype Pollution in GitHub repository automattic/mongoose prior to 7.3.4. Rated critical severity (CVSS 9.8), this vu
Prototype Pollution in GitHub repository automattic/mongoose prior to 6.4.6. Rated critical severity (CVSS 9.8), this vu
An integer overflow in parse_mqtt in mongoose.c in Cesanta Mongoose 6.16 allows an attacker to achieve remote DoS (infin
Mongoose before 8.8.3 can improperly use $where in match, leading to search injection. Rated critical severity (CVSS 9.1
The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 (compiled with OpenSSL support) is vulnerable to remote OO
The mg_tls_init function in Cesanta Mongoose HTTPS server 7.0 and 6.7-6.18 (compiled with mbedTLS support) is vulnerable
The mg_http_serve_file function in Cesanta Mongoose HTTP server 7.0 is vulnerable to remote OOB write attack via connect
EUVD-2026-63500
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB