Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-108816 Overview
CVE-2026-108816 is a code injection vulnerability in the agno-agi agno framework, affecting versions up to 3.0.6. The flaw resides in the run_python_code function within python.py of the PythonTools component. An attacker can manipulate the code argument to inject and execute arbitrary Python statements remotely. The weakness is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component. Public exploit details have been released, and the project maintainers have not yet responded to the issue report filed on GitHub.
Critical Impact
Authenticated remote attackers can inject Python code into the run_python_code function, potentially leading to arbitrary code execution within the agent runtime environment.
Affected Products
- agno-agi agno framework versions up to and including 3.0.6
- PythonTools component (python.py)
- Applications embedding agno agents that expose the run_python_code tool
Discovery Timeline
- 2026-10-12 - CVE-2026-108816 published to the National Vulnerability Database (NVD)
- 2026-10-15 - Last updated in NVD database
Technical Details for CVE-2026-108816
Vulnerability Analysis
The agno framework provides agent tooling for large language model (LLM) workflows. The PythonTools component exposes a run_python_code function intended to let agents execute Python logic as part of their task flow. The function accepts a code string parameter that is passed to the Python interpreter without adequate sandboxing or neutralization of dangerous constructs. An attacker able to influence the agent's input, whether through a prompt, downstream data source, or exposed API, can supply payloads that execute as native Python code within the host process. Because the vulnerability affects a tool invoked by autonomous agents, prompt injection against upstream LLMs can indirectly trigger exploitation, broadening the realistic attack surface.
Root Cause
The root cause is improper neutralization of input used in a downstream interpreter call [CWE-74]. The run_python_code function treats the supplied code argument as trusted executable logic rather than untrusted data. No allowlist, syntax restriction, or isolated execution boundary separates the attacker-controlled string from the Python runtime that hosts the agent.
Attack Vector
Exploitation requires network access and low-privilege authentication to the agent interface, with no user interaction. An attacker submits crafted input that reaches run_python_code, either directly through an exposed tool-calling endpoint or indirectly via prompt injection against an LLM that calls the tool. Successful exploitation yields code execution in the context of the agent process, exposing credentials, secrets, and connected resources.
No verified proof-of-concept code is included in this advisory. Refer to the GitHub Security Advisory for agno PythonTools and the VulDB Vulnerability Report #416593 for technical details.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-108816
Indicators of Compromise
- Unexpected child processes spawned by the Python process hosting the agno agent, such as sh, bash, curl, or wget.
- Outbound network connections from the agent host to unfamiliar domains or raw IP addresses shortly after tool invocation.
- Agent log entries showing run_python_code calls containing imports of os, subprocess, socket, or encoded payloads such as base64-wrapped exec statements.
Detection Strategies
- Instrument the PythonTools.run_python_code call path to log every submitted code argument alongside the authenticated principal and request origin.
- Alert on Python code strings referencing filesystem, network, or process APIs that are not expected in normal agent workflows.
- Correlate LLM prompt content with tool-call payloads to identify prompt-injection patterns that steer the agent toward sensitive operations.
Monitoring Recommendations
- Forward agent runtime logs and process telemetry to a centralized analytics tier for behavioral review.
- Baseline normal run_python_code usage per agent and alert on deviations in payload size, module imports, or execution duration.
- Monitor egress traffic from agent hosts and flag connections to non-approved destinations.
How to Mitigate CVE-2026-108816
Immediate Actions Required
- Inventory deployments of agno and identify any instance running version 3.0.6 or earlier.
- Disable or remove the PythonTools toolset from agent configurations where arbitrary code execution is not a hard requirement.
- Restrict network reachability of agent endpoints to trusted internal callers and enforce authentication on all tool-calling interfaces.
Patch Information
At the time of publication, the upstream project has not released a patch and has not responded to the public issue report. Track the GitHub Issue Tracker for agno and the agno project repository for a fixed release. Review the VulDB entry for CVE-2026-108816 for updates on remediation status.
Workarounds
- Replace PythonTools with a constrained alternative that validates or whitelists permitted operations rather than executing arbitrary code.
- Execute agent workloads inside hardened sandboxes such as gVisor, Firecracker microVMs, or ephemeral containers with no network egress and minimal filesystem access.
- Apply strict input filtering on LLM outputs that feed into tool calls, blocking Python constructs capable of invoking system, subprocess, or socket APIs.
- Run the agent process under a dedicated low-privilege account with no access to secrets, credentials, or production data stores.
# Example: run the agno agent inside a non-privileged, network-isolated container
docker run --rm \
--user 65534:65534 \
--read-only \
--cap-drop=ALL \
--security-opt=no-new-privileges \
--network=none \
--pids-limit=64 \
--memory=512m \
-v /opt/agno/config:/config:ro \
agno-runtime:hardened
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

