letta-ai letta Code Injection Vulnerability in function_message

Vulnerability

A critical code injection vulnerability has been identified in letta-ai letta versions through 0.4.1. The issue arises in the function_message of letta/letta/interface.py, where the eval() function is used to execute dynamically evaluated code. This vulnerability allows attackers to manipulate the function_args argument and execute arbitrary Python code, potentially leading to unauthorized access, data leakage, or other security risks.

Impact

Exploitation of this vulnerability allows for arbitrary code execution on the server where letta-ai letta is running.

Reproduction

To reproduce this vulnerability, send a message to the function_message that starts with 'Running ' and includes crafted Python code in the function_args portion. The code will be executed when the message is processed, allowing for arbitrary code execution on the server.

Added: Jun 16, 2025, 3:22 AM
Updated: Jun 16, 2025, 3:22 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
8.7
remediation
0.0
relevance
0.2
threat
6.4
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.