Code executionin CVE-2024-42002.
No public exploit found; not on exploited lists.
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.
- No fixed release is available at the time of publication. A fix is proposed upstream in https://github.com/ros2/ros2cli/pull/1001.
- Can't upgrade today? Do not pass untrusted or unreviewed input to the --filter option of 'ros2 topic hz'.
Not confirmed by any source yet: affected versions not confirmed; fixed version not confirmed. We show these as not confirmed instead of guessing.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 1 Aug 2024CVE ID reserved by canonical.
- 28 Sep 2026Published in the CVE List.
- 30 Sep 2026CVE record last updated.
Attack code anyone can find
Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Same weakness: Eval injection
- github.com patch
- github.com issue-tracking
Patchminder. CVE-2024-42002: Code execution in CVE-2024-42002. https://patchminder.com/cve/cve-2024-42002/ (accessed 5 December 2026).