JLSEC-2026-2425: High severity julia/mongoose_jll vulnerability
Mongoose is an embedded web server and network library. Prior to 7.22, the Mongoose MQTT broker tutorial's mgmqttnexttopic() function can read two bytes beyond msg->dgram.len when a malformed MQTT SUBSCRIBE packet supplies a topic position that does not leave enough bytes for the topic-length field. Because tutorials/mqtt/mqtt-server/main.c reads that field without validating the complete two-byte access against the datagram boundary, an unauthenticated remote MQTT client can trigger invalid memory access and crash the broker. This issue is fixed in 7.22.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
julia/Mongoose_jllto a version that resolves this vulnerability.Fixed in 7.23.0+0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.22
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
The affected code is in the MQTT broker tutorial at tutorials/mqtt/mqtt-server/main.c. Deployments using that tutorial broker code with a Mongoose version before 7.22 are exposed.
What does an attacker need to exploit it?
An unauthenticated remote MQTT client only needs network access to the broker and the ability to send a malformed MQTT SUBSCRIBE packet. No privileges or user interaction are required.
What is the practical impact of exploitation?
The malformed packet can cause an invalid memory access that crashes the MQTT broker, resulting in a denial of service. The provided data does not indicate confidentiality or integrity impact.
What should be done if immediate upgrading is not possible?
Restrict network access to the MQTT broker so untrusted remote clients cannot send MQTT packets, especially SUBSCRIBE requests. This reduces exposure because exploitation requires remote broker access.
How can I determine whether I am affected?
Check whether your deployment uses the MQTT broker tutorial implementation and whether its Mongoose version is earlier than 7.22. The vulnerable function is mg_mqtt_next_topic() in tutorials/mqtt/mqtt-server/main.c.