CVE-2026-108816
Remote code injection via unvalidated code argument in agno‑agi PythonTools run_python_code.
- CVSS 2.1
- CWE-74
- Input Validation and Sanitization
- Remote
A vulnerability was found in agno-agi agno up to 3.0.6. Affected by this vulnerability is the function run_python_code of the file python.py of the component PythonTools. The manipulation of the argument code results in code injection. The attack can be launched remotely. The exploit has been made public and could be used. The project was informed of the problem early through an issue report but has not responded yet.
- CWE
- CWE-74
- CVSS base score
- 2.1
- Published
- 2026-10-12
- OWASP
- A03 Injection
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Command Injection
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- PythonTools
- Fixed by upgrading
- Yes
Solution
Upgrade agno-agi to version 3.0.7, which patches the run_python_code code‑injection flaw.
Vulnerable code sample
import subprocess
def run_python_code(code: str):
# VULNERABLE: executes arbitrary code string
exec(code)Patched code sample
import subprocess
import builtins
def run_python_code(code: str):
# FIX: restrict builtins and disallow exec of raw code
safe_globals = {"__builtins__": {"print": builtins.print, "len": builtins.len}}
exec(code, safe_globals, {})Cite this entry
@misc{vaitp:cve2026108816,
title = {{Remote code injection via unvalidated code argument in agno‑agi PythonTools run_python_code.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-108816},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-108816/}}
}
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 ::
