CVE-2026-6985 Cesanta Mongoose TCP Option net_builtin.c handle_opt infinite loop
A remote attacker can cause a denial of service via an infinite loop in the TCP option handler of the Cesanta Mongoose library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-6985?
CVE-2026-6985 is a medium-severity denial of service vulnerability in Cesanta Mongoose, published on 25 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A weakness has been identified in Cesanta Mongoose up to 7.20. This vulnerability affects the function handle_opt of the file /src/net_builtin.c of the component TCP Option Handler. This manipulation of the argument optlen causes infinite loop. The attack is possible to be carried out remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 7.21 is able to resolve this issue. Upgrading the affected component is advised. VulDB has contacted the vendor early and they confirmed quickly, that this issue got fixed already.
Which versions are affected by CVE-2026-6985?
It affects 1 product.
Products include Cesanta Mongoose.
How do I fix CVE-2026-6985?
Upgrade to a fixed version.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-6985 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-6985 exists.
Other vulnerabilities in Cesanta Mongoose
Sources
Also known as DEBIAN-CVE-2026-6985, GHSA-3ppf-435x-3p66, JLSEC-2026-372, UBUNTU-CVE-2026-6985.