---
title: "CVE-2024-42002\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2024-42002?format=md
keywords: index, follow
---

# CVE-2024-42002

Publication date 28 September 2026

Last updated 28 September 2026

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

Toggle side navigation

## 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.

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| ros-foxy-ros2topic | 20.04 LTS focal | Fixed 0.9.13+20.04.3-0 |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-42002)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2024-42002)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2024-42002)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2024-42002)

### Other references

* <https://www.cve.org/CVERecord?id=CVE-2024-42002>
* <https://github.com/ros2/ros2cli/pull/1001>
* <https://github.com/ros2/ros2cli/pull/133#discussion_r223081766>
