CVE-2024-42002: CWE-95 Improper neutralization of directives in dynamically evaluated code ('eval injection') in Open Source Robotics Foundation Robot Operating System 2 (ROS 2)
A code injection vulnerability has been discovered in the Robot Operating System 2 (ROS 2) 'ros2topic' command-line tool, affecting all ROS 2 distributions from Crystal Clemmys up to and including Lyrical Luth and Rolling Ridley. The vulnerability lies in the 'hz' verb, which reports the publishing rate of a topic and accepts a user-provided Python expression via the --filter option. This input is passed directly to the eval() function without sanitization, allowing a local user to craft and execute arbitrary code.
CVE-2024-42002: CWE-95 Improper neutralization of directives in dynamically evaluated code ('eval injection') in Open Source Robotics Foundation Robot Operating System 2 (ROS 2)
Description
A code injection vulnerability has been discovered in the Robot Operating System 2 (ROS 2) 'ros2topic' command-line tool, affecting all ROS 2 distributions from Crystal Clemmys up to and including Lyrical Luth and Rolling Ridley. The vulnerability lies in the 'hz' verb, which reports the publishing rate of a topic and accepts a user-provided Python expression via the --filter option. This input is passed directly to the eval() function without sanitization, allowing a local user to craft and execute arbitrary code.
CVSS v4.0
Score 8.6high
Affected software
Open Source Robotics Foundation
Robot Operating System 2 (ROS 2)
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- canonical
- Date Reserved
- 2024-08-01T12:00:12.183Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6abae0aff7a7c54106405a4f
Added to database: 09/28/2026, 21:48:31 UTC
Last updated: 09/28/2026, 21:48:31 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.