Detect Agno FunctionCall field_type eval() Arbitrary Code Execution (CVE-2026-35002) in Elastic Security
Detects exploitation of CVE-2026-35002, an arbitrary code execution vulnerability in the Agno AI agent framework (Python, pip package 'agno') prior to version 2.3.24. The field_type parameter on a FunctionCall input field was passed to Python's eval() (CWE-95), allowing an attacker who can influence that value to execute arbitrary Python code in the Agno process. Exploitation typically appears as a Python interpreter spawning unexpected child processes (shells, curl/wget, reverse-shell payloads) or performing unusual network or file activity. This detection surfaces vulnerable agno installations and the process and behavioral signatures of successful code execution. CVSS 9.8, PoC public.
Based on VulnCheck Advisory: agno field_type eval injection arbitrary code execution
MITRE ATT&CK
- Tactic
- Execution
Elastic Detection Query
// df00tech DF00-6a0f0708c3 · https://df00tech.com/detections/CVE-2026-35002 · licence: https://df00tech.com/detections/licence
process where event.type == "start" and
process.parent.name in ("python","python3","python.exe","pythonw.exe") and
(process.parent.command_line : ("*agno*","*agent*","*FunctionCall*")) and
(
process.name in ("sh","bash","zsh","dash","cmd.exe","powershell.exe","pwsh","curl","wget","nc","ncat","socat") or
process.command_line : ("*/dev/tcp*","*base64 -d*","*os.system*","*__import__*","*socket.socket*")
) EQL rule matching python/agno parent processes launching shells, network tooling, or inline code-exec primitives from the eval() injection.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate agno tooling that shells out by design
- Developer workstations running agno interactively
- Test pipelines invoking subprocesses
Other platforms for CVE-2026-35002
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Simulate agno field_type eval() injection spawning a shell
Expected signal: Process-creation event: python3 (argv agno-agent) as parent spawning sh -c 'id' with output redirection.
- Test 2 Simulate eval() injection performing network egress
Expected signal: python (agno) parent spawning curl to a localhost URL.
- Test 3 Identify vulnerable agno installation
Expected signal: pip/python process reading agno package metadata.
References (6)
- https://github.com/agno-agi/agno/security/advisories/GHSA-m4w4-3r8h-jw98
- https://nvd.nist.gov/vuln/detail/CVE-2026-35002
- https://github.com/agno-agi/agno/commit/cbf675521d4d2281925a051784a3b94172e56416
- https://github.com/agno-agi/agno/releases/tag/v2.3.24
- https://www.vulncheck.com/advisories/agno-field-type-eval-injection-arbitrary-code-execution
- https://github.com/advisories/GHSA-m4w4-3r8h-jw98
Response Playbook
Triage
- Confirm the affected host runs the agno Python package and determine the installed version with `pip show agno` (or inspect the project's lockfile/requirements). Versions < 2.3.24 are vulnerable.
- Review the alerting python process's parent/child chain: identify whether an agno agent spawned the suspicious child process and capture the full command line of both.
- Inspect the agent's tool/function schema definitions and any recent inputs (prompts, tool outputs, external schemas) for attacker-controlled field_type values containing Python expressions.
- Determine whether the spawned child process performed network egress, file writes, or persistence actions that indicate successful code execution rather than a benign tool invocation.
Containment
- Isolate the affected host from the network to prevent further command-and-control or lateral movement.
- Terminate the compromised agno agent process and any child processes it spawned, then disable the agent service until patched.
- Upgrade agno to version 2.3.24 or later across all affected environments and restrict which tool/function schemas the agent will accept from untrusted sources.
Evidence Collection
- Capture the full process tree (parent python/agno process and all children) with command lines, timestamps, and user context.
- Preserve the agno agent configuration, tool/function definitions, and any session transcripts or logged FunctionCall objects containing the malicious field_type.
- Collect host network connection logs and any files created or modified by the spawned processes for forensic analysis.
Escalation Criteria
- !Escalate to incident response if the spawned process established outbound C2, downloaded additional payloads, or achieved persistence.
- !Escalate if evidence shows lateral movement, credential access, or data exfiltration originating from the compromised agent host.
- !Escalate if multiple hosts or production AI-agent services are confirmed to run vulnerable agno versions and are internet-exposed.
Investigation Guide
Forensic Artifacts
- >
Process-creation events showing a python/agno parent spawning shells or network utilities - >
agno agent tool/function schema definitions and logged FunctionCall objects containing a malicious field_type - >
Installed agno package version metadata (pip, site-packages dist-info)
Tuning Guidance
Baseline the legitimate tools your agno agents are configured to use. If an agent is intentionally granted a shell or command-execution tool, exclude that specific child-process/command pattern and instead alert on deviations (unexpected binaries, /dev/tcp reverse shells, base64-decoded commands). Scope the parent-process match to hosts known to run agno to reduce noise, and raise confidence to high once agno version < 2.3.24 is confirmed on the host.
Hunting Queries
Hunt for agno-associated python processes spawning shells or network tools across the estate.
// df00tech DF00-6a0f0708c3 · https://df00tech.com/detections/CVE-2026-35002 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where InitiatingProcessFileName in~ ("python","python3") | where InitiatingProcessCommandLine has "agno" | where FileName in~ ("sh","bash","curl","wget","nc") | project Timestamp, DeviceName, InitiatingProcessCommandLine, FileName, ProcessCommandLine ``` df00tech DF00-6a0f0708c3 · https://df00tech.com/detections/CVE-2026-35002 · licence: https://df00tech.com/detections/licence ```
index=* sourcetype="linux:process" parent_process="*python*" parent_process="*agno*" | search process_name IN ("sh","bash","curl","wget","nc") | table _time host parent_process process_name process Atomic Red Team Tests
In a lab, run a python process named/argv'd to resemble an agno agent that evaluates attacker-controlled field_type, causing a shell command to execute.
Command
python3 -c "import sys; sys.argv[0]='agno-agent'; field_type=\"__import__('os').system('id > /tmp/agno_poc.txt')\"; eval(field_type)" Cleanup
rm -f /tmp/agno_poc.txt Expected Telemetry
Process-creation event: python3 (argv agno-agent) as parent spawning sh -c 'id' with output redirection.
Expected Detection
KQL/SPL/EDR rules match the python/agno parent spawning a shell via os.system/__import__.
Lab simulation where the injected field_type triggers an outbound curl, mimicking C2 download after code execution.
Command
python3 -c "import os; os.environ['AGENT']='agno'; field_type=\"__import__('subprocess').call(['curl','-s','http://127.0.0.1:8000/poc'])\"; eval(field_type)" Cleanup
echo 'no artifacts to clean' Expected Telemetry
python (agno) parent spawning curl to a localhost URL.
Expected Detection
Rules match the curl/network-tool child of a python/agno parent.
Enumerate the installed agno version to confirm exposure to CVE-2026-35002 (< 2.3.24).
Command
pip show agno 2>/dev/null | grep -i version || python3 -c "import agno,sys; print(getattr(agno,'__version__','unknown'))" Cleanup
echo 'no changes made' Expected Telemetry
pip/python process reading agno package metadata.
Expected Detection
Vulnerability-management correlation flags agno < 2.3.24 as affected (not an EDR behavioral detection).