Impact
A heap-based buffer overflow was discovered in the mg_tls_recv_cert function of Cesanta Mongoose’s TLS 1.3 handler. Manipulating the pubkey argument during the TLS handshake can corrupt heap memory, potentially allowing an attacker to execute arbitrary code or crash the process. The vulnerability is identified as a buffer overflow weakness (CWE‑119, CWE‑122).
Affected Systems
The flaw affects all Cesanta Mongoose releases up to and including version 7.20. The vendor released a fixed build in version 7.21, which incorporates the patch commit 0d882f1b43ff2308b7486a56a9d60cd6dba8a3f1. Upgrading to that or a later release eliminates the issue.
Risk and Exploitability
The CVSS score is 6.9, indicating moderate severity. No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog. Exploitation is possible remotely by supplying a crafted TLS certificate during the handshake; this requires the target to accept connections from untrusted client peers. Due to the public disclosure and demonstrated exploitability, the issue poses a tangible risk to affected deployments.
OpenCVE Enrichment