Description
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.
Published: 2026-08-20
Score: 9.1 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Mongoose, an embedded web server and network library, allows a wildcard certificate for a parent domain to impersonate subdomains of deeper levels because its wildcard matching logic crosses DNS label boundaries. A pattern such as *.example.com can match foo.bar.example.com, bypassing hostname verification. This flaw permits an on‑path attacker to intercept and modify TLS traffic intended for legitimate subdomains, compromising confidentiality and integrity and potentially enabling further exploitation of the client.

Affected Systems

The issue affects all cesanta:mongoose versions released before 7.22. Clients and servers that incorporate Mongoose 7.21 or older are vulnerable, while version 7.22 and later include a fix that enforces proper hostname verification.

Risk and Exploitability

The CVSS score is 9.1, indicating a high severity flaw. EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector requires an on‑path network attacker who can present a wild‑card certificate for the parent domain; such a scenario is plausible in compromised or controlled network environments. Exploiting the bypass can lead to full TLS traffic interception and modification, potentially exposing sensitive data or facilitating additional attacks against applications using the compromised TLS channel.

Generated by OpenCVE AI on August 20, 2026 at 19:42 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Mongoose to version 7.22 or later to apply the fixed wildcard matching logic.
  • If an upgrade is not immediately possible, rebuild the application with the patched source from repository revision a9df523f76f43a38bd53b4232b9cfd4c16869e71 or later, ensuring the latest build uses the corrected functions.
  • Avoid using wildcard certificates for parent domains that may match subdomains any deeper than intended; instead, issue certificates that match only the specific subdomains that require TLS.
  • Implement application‑level certificate pinning or stricter TLS validation if the library does not support it natively, to prevent acceptance of incorrectly matched certificates.

Generated by OpenCVE AI on August 20, 2026 at 19:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 20 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
First Time appeared Cesanta
Cesanta mongoose
Vendors & Products Cesanta
Cesanta mongoose

Thu, 20 Aug 2026 17:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Mongoose: TLS Hostname Verification Bypass via Overly Permissive Wildcard Matching
Weaknesses CWE-295
References
Metrics cvssV4_0

{'score': 9.1, 'vector': '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'}


Subscriptions

Cesanta Mongoose
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-20T18:36:17.262Z

Reserved: 2026-08-11T17:18:01.598Z

Link: CVE-2026-73253

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-20T18:16:45.940

Modified: 2026-08-20T19:17:01.203

Link: CVE-2026-73253

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T18:30:03Z

Weaknesses
  • CWE-295

    Improper Certificate Validation