VAITP Dataset

← Back to the dataset

CVE-2023-51204

Insecure ROS2 Foxy deserialization lets attackers run code, though disputed.

  • CVSS 9.8
  • CWE-502
  • Input Validation and Sanitization
  • Remote

Insecure deserialization in ROS2 Foxy Fitzroy ROS_VERSION=2 and ROS_PYTHON_VERSION=3 allows attackers to execute arbitrary code via a crafted input. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.

CVSS base score
9.8
Published
2024-01-30
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Interface
Code defect classification
Serialization Issues
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
ROS2
Fixed by upgrading
Yes

Solution

Upgrade ROS 2 Foxy to version foxy‑2023‑06‑01 (or newer), which includes the fix for the insecure deserialization issue.

Vulnerable code sample

import pickle

def load_robot_state(data: bytes):
    # VULNERABLE: uses pickle.loads which can execute arbitrary code
    state = pickle.loads(data)
    return state

Patched code sample

import pickle
import json
import base64

def load_robot_state(data: bytes):
    # FIX: replace pickle.loads with safe JSON deserialization
    json_str = base64.b64decode(data).decode('utf-8')
    state = json.loads(json_str)
    return state

Cite this entry

@misc{vaitp:cve202351204,
  title        = {{Insecure ROS2 Foxy deserialization lets attackers run code, though disputed.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2023-51204},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2023-51204/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.