Stack-based Buffer Overflow Affecting PX4/PX4-Autopilot package, versions [1.9.0-alpha, 1.16.0-beta1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.08% (24th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-PX4PX4AUTOPILOT-10658569
  • published8 Jul 2025
  • disclosed5 Jun 2025
  • creditShihao Wu

Introduced: 5 Jun 2025

CVE-2025-5640  (opens in a new tab)
CWE-121  (opens in a new tab)

How to fix?

Upgrade PX4/PX4-Autopilot to version 1.16.0-beta1 or higher.

Overview

Affected versions of this package are vulnerable to Stack-based Buffer Overflow through the MavlinkReceiver::handle_message_trajectory_representation_waypoints function. An attacker can execute arbitrary code by sending a specially crafted message larger than the allocated buffer capacity.

PoC

1. open px4 with jmavsim
2. send a packet,such as fdef0000dcea6f4c01006de9d06a0548182a1fcc8b7cc542eb8945a54baa92ee908db9af0195bb5dce5f9ab613be912485d34e577c352c5cdc06592484be1aecd64a07127bda31fc8f41f300a9e4a0eab80d8835f106924f0b89ece3e256dda30e3001f07df4e1633e6f827b7812731dbc3daf1e81fc06cea4d9c8c1525fb955d3eddd7454b54bb740bcd87b00063bd9111d4fb4149658d4ccd92974c97c7158189a8d6354242bdfcef1427429d762cbabe7d3bd9ad7b292fd206fecbc6bd8dee4422f129bb72794905979f8b369b415bacac087b028626846093354bca7cdf5b3aeca117b2f906e83e1fde3e5421fe6b689cd4f9359cdadc82086

CVSS Base Scores

version 4.0
version 3.1