CVE-2024-42002: Unsafe use of eval() method in ros2 topic hz tool

Published Sep 28, 2026
·
Updated

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.

Affected Software

1 affected component
Open Robotics ros2topic>=Crystal Clemmys<=Lyrical Luth, =Rolling Ridley

Event History

Sep 28, 2026
CVE Published
via MITRE·09:38 PM
Data Sourced
via MITRE·09:38 PM
RemedyDescriptionSeverityWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue?

A local user who can run the ros2topic command-line tool can exploit it. The supplied vector has no privileges or user interaction requirements.

2

What input is required to trigger code execution?

The attacker must invoke the hz verb and provide a crafted Python expression through the --filter option. That expression is passed directly to Python eval() without sanitization.

3

Which ROS 2 releases are affected?

All ROS 2 distributions from Crystal Clemmys through Lyrical Luth, including Rolling Ridley, are affected according to the available information.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203