PyPI: langroid

CVE-2026-54771

Safety vulnerability ID: SFTY-20260706-18701

Affected versions of the Langroid package are vulnerable to Improper Input Validation due to inadequate sender verification for tool invocation. The `handle_message()` function executes user-supplied tool JSON without checking if the message originated from `Entity.USER` or `Entity.LLM`, bypassing the intended restriction set by `use=False, handle=True`. An attacker can exploit this by sending crafted JSON payloads to directly invoke tools, potentially leading to unauthorized actions such as file manipulation, database queries, or access to internal systems.

Created at: Jul 10, 2026Updated at: Jul 10, 2026

Overview

Langroid: handle_message() executes user-supplied tool JSON without sender verification

Advisory

langroid – Improper Neutralization of Special Elements in Output

Affected Package

Affecting langroid package, versions<= 0.65.2

Also affects

---

How to Fix

Upgradelangroidto0.65.3or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more