CVE-2026-32724
Heap-Use-After-Free in PX4 MavlinkShell Enables Remote Crash
Publication date: 2026-03-16
Last updated on: 2026-03-16
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| dronecode | px4_drone_autopilot | to 1.17.0 (exc) |
| dronecode | px4_drone_autopilot | 1.17.0 |
| dronecode | px4_drone_autopilot | 1.17.0 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-416 | The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-32724 is a heap use-after-free vulnerability in the PX4 autopilot software, specifically in the MavlinkShell::available() function.
The issue is caused by a race condition between two threads: the MAVLink receiver thread, which manages shell creation and destruction, and the telemetry sender thread, which polls the shell for available output.
When the receiver thread deletes the shell instance upon receiving certain MAVLink SERIAL_CONTROL messages, the sender thread may still try to access this freed memory, causing a use-after-free error.
This vulnerability can be triggered remotely by sending crafted MAVLink SERIAL_CONTROL messages from an external ground station or automated script.
How can this vulnerability impact me? :
This vulnerability can cause undefined behavior such as crashes and memory corruption in the flight controller running PX4 autopilot.
Although remote code execution has not been demonstrated, use-after-free vulnerabilities are critical because they have the potential to be exploited for more severe attacks.
The vulnerability is remotely triggerable without any privileges or user interaction, which increases the risk of exploitation.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring for heap-use-after-free errors in the PX4 autopilot software, specifically related to the MavlinkShell::available() function. Detection was originally done using AddressSanitizer (ASan) during fuzz testing of MAVLink SERIAL_CONTROL (ID 126) messages.
To detect this issue on your system, you can run PX4 SITL (Software In The Loop) compiled with ASan enabled and send crafted SERIAL_CONTROL MAVLink messages to trigger the race condition.
While no specific commands are provided, the detection approach involves:
- Compile PX4 SITL with AddressSanitizer enabled.
- Run PX4 SITL connected to a ground station like QGroundControl.
- Send crafted MAVLink SERIAL_CONTROL messages (ID 126) that trigger shell creation and destruction.
- Observe ASan output for heap-use-after-free errors related to MavlinkShell::available().
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to upgrade the PX4 autopilot software to version 1.17.0-rc1 or later, where this heap-use-after-free vulnerability has been fixed.
Until the upgrade can be applied, limit or block MAVLink SERIAL_CONTROL (ID 126) messages from untrusted sources, such as external ground stations or automated scripts, to reduce the risk of remote exploitation.
Additionally, monitor system logs and behavior for crashes or memory corruption symptoms that may indicate exploitation attempts.