PyPI: langroid

CVE-2026-50181

Safety vulnerability ID: SFTY-20260702-97723

Affected versions of the Langroid package are vulnerable to Path Traversal due to insufficient path validation in file operations. The `ReadFileTool` and `WriteFileTool` components fail to enforce that user-supplied `file_path` values remain within the configured `curr_dir`, allowing traversal sequences like `../` to access files outside the intended directory. An attacker can exploit this vulnerability by supplying crafted file paths to read or write files beyond the restricted directory, potentially exposing sensitive data or altering unauthorized files.

Created at: Jul 14, 2026Updated at: Jul 14, 2026

Overview

Langroid: Path traversal in the file tools allows read/write outside configured current directory

Advisory

langroid – Path Traversal

Affected Package

Affecting langroid package, versions<= 0.63.0

Also affects

---

How to Fix

Upgradelangroidto0.64.0or 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