CVE-2024-3935
NoneCVSS
—
EPSS
0.7%
Published
Oct 30, 2024
CISA due date
—
Cloudanix analysis
A flaw in the Mosquitto messaging server can let a remote attacker crash the server by sending one specially made message, stopping all connected devices from communicating until someone restarts it.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Network Service
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Double free memory corruption in the Mosquitto broker when processing a crafted PUBLISH packet over an outgoing bridge connection that uses incoming topic remapping, resulting in immediate process termination.
Why it matters to the business
Broker outage disrupts MQTT message routing for any connected clients and applications, causing loss of IoT or telemetry data flows until manual restart.
How an attack unfolds
An attacker with network access to the remote broker endpoint sends a specially crafted PUBLISH packet that triggers topic remapping on the incoming bridge; the broker's handling path performs two frees on the same allocation, crashing the process.
How to fix it
Upgrade Eclipse Mosquitto to the commit 5eb40ee3d691fb3c2dc222685e7ffcf6e6a69a79 or later releases; for Ubuntu packages apply the listed kernel fixes where Mosquitto is bundled.
How to confirm the fix worked
Confirm the running Mosquitto binary or package version is newer than the vulnerable range; attempt to reproduce the crash with a controlled test packet in a lab environment after upgrade to verify absence of the double-free path.
Typical attack path
- Identify a Mosquitto broker configured with an outgoing bridge that has incoming topic remapping enabled.
- Establish a connection to the remote side of the bridge.
- Transmit a crafted PUBLISH packet targeting the remapped topic.
- Trigger the double-free condition leading to broker crash and denial of service.
How to detect it
Review Mosquitto daemon logs and system crash dumps for abrupt terminations around the time of unexpected PUBLISH traffic on bridged topics; correlate with bridge connection events and memory-related fault signatures.
- mosquitto process segmentation fault or abort in system logs
- bridge connection with remapping enabled in mosquitto.conf
- unexpected broker restart without configuration change
What your security team should do
- Immediately upgrade all Mosquitto instances to the fixed commit or patched distribution packages.
- Audit bridge configurations and disable topic remapping on outgoing bridges where not strictly required.
- Implement network segmentation so only trusted endpoints can reach bridge connections.
- Monitor broker process health and enable automatic restarts with alerting on unexpected terminations.
The record
In Eclipse Mosquito, versions from 2.0.0 through 2.0.18, if a Mosquitto broker is configured to create an outgoing bridge connection, and that bridge connection has an incoming topic configured that makes use of topic remapping, then if the remote connection sends a crafted PUBLISH packet to the broker a double free will occur with a subsequent crash of the broker.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | mosquitto | 0 | No fix |
| Debian:11 | mosquitto | 0 | 2.0.11-1+deb11u2 |
| Debian:12 | mosquitto | 0 | No fix |
| Debian:13 | mosquitto | 0 | 2.0.20-1 |
| Debian:14 | mosquitto | 0 | 2.0.20-1 |
| Ubuntu:20.04:LTS | mosquitto | 0 | No fix |
| Ubuntu:22.04:LTS | mosquitto | 0 | No fix |
| Ubuntu:22.04:LTS | mosquitto | 0 | 2.0.11-1ubuntu1.2 |
| Ubuntu:24.04:LTS | mosquitto | 0 | No fix |
| Ubuntu:24.10 | mosquitto | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | mosquitto | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | mosquitto | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mosquitto | 0 | No fix |
| Ubuntu:Pro:24.04:LTS | mosquitto | 0 | 2.0.18-1ubuntu0.1~esm1 |
| openSUSE:Leap 16.0 | mosquitto | 0 | 2.0.23-bp160.1.1 |
| openSUSE:Tumbleweed | mosquitto | 0 | 2.0.21-2.1 |