CVE-2026-35002: Agno: Arbitrary code execution via `eval()` on `field_type` in `FunctionCall`
Agno, the Python agent framework, passed the `field_type` value of a `FunctionCall` input field to `eval()`. An attacker who can influence that value runs arbitrary Python inside the Agno process. All versions before 2.3.24 are affected. Upgrade to 2.3.24 or later. The 2.6.x line also contains the fix.
Published Oct 27, 2026 · Analysis Oct 27, 2026
What an attacker can do
In libs/agno/agno/models/base.py, both run_function_calls and arun_function_calls called eval(field_type) to turn a type name into a Python type. UserInputField.from_dict in libs/agno/agno/tools/function.py did the same. If an attacker controls the string, it is not limited to names like int. It can be any Python expression, and it runs with the full rights of the Agno process (CWE-95, eval injection).
The advisory says any deployment that exposes Agno to user-influenced FunctionCall input is affected. Its examples are an API, a web UI, or untrusted tool or model output. The last one matters for agent teams: a prompt-injected model or a hostile tool response can shape those inputs. The CVSS vector needs no privileges and no user interaction.
The result is code execution with access to everything the agent process holds: model API keys, database credentials, tool credentials, files and the network. Agents often run with broad credentials, so one injected expression can reach well past the framework.
Who is affected
Every agno release below 2.3.24 on PyPI is vulnerable. The risk is highest where agents take human-in-the-loop user input fields, or where FunctionCall inputs come from an API, a UI or tool output you do not control.
Check the installed version:
pip show agnoAlso search your own code for custom paths that build input fields from external data.
agno
- Ecosystem
- PyPI
- Affected
- < 2.3.24
- Fixed in
- 2.3.24
- Check
pip show agno
How to fix it
Upgrade to agno 2.3.24 or later:
pip install --upgrade "agno>=2.3.24"The fix replaces eval() with a fixed type_mapping lookup (str, int, float, bool, list, dict). A string is looked up there, an existing type object is used as is, and anything else falls back to str.
The advisory says there is no safe workaround. If you cannot upgrade yet, make sure no untrusted input can reach field_type.
How to tell if you were hit
The advisory lists no indicators. Look in application logs and traces for FunctionCall inputs whose field_type is not one of str, int, float, bool, list or dict. Look for Python expressions or __import__ in those values.
On the host, review child processes and outbound connections from the Python process running Agno. Rotate any keys the process could read if you find a match. If an agent runs next to Beam, its record of shell commands and file access can show what the process did after the injection.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
Agno versions prior to 2.3.24 contain an arbitrary code execution vulnerability in the model execution component. The field_type parameter on a FunctionCall input field was passed to Python's built-in eval(), allowing an attacker who could influence that value to execute arbitrary Python code in the Agno process.
This is a code injection flaw (CWE-95) with full impact to confidentiality, integrity, and availability. CVSS 3.1 score: 9.3 (Critical).
Any deployment that exposes Agno to user-influenced FunctionCall inputs (for example via an API, web UI, or untrusted tool/model output) is affected.
Patches
Fixed in Agno 2.3.24.
The unsafe eval() call was replaced with a fixed type_mapping dictionary lookup, and field_type is now validated as either a known string key or an already-resolved type object before use. See commit cbf67552 (PR #5912).
All users should upgrade to 2.3.24 or later. The current release line (2.6.x) includes the fix.
Workarounds
There is no safe workaround. Users who cannot upgrade should ensure no untrusted input can reach the field_type parameter of FunctionCall input fields, but upgrading is strongly preferred.
References
- Patch commit: https://github.com/agno-agi/agno/commit/cbf675521d4d2281925a051784a3b94172e56416
- Patch PR: https://github.com/agno-agi/agno/pull/5912
- CWE-95: https://cwe.mitre.org/data/definitions/95.html
Credited to harshsinha03.
Questions
- Which Agno version fixes the eval() flaw in FunctionCall?
Agno 2.3.24 fixes it. The commit replaces
eval()with a type lookup table. The current 2.6.x release line includes the fix too.- Is there a workaround if I cannot upgrade Agno?
The advisory says no safe workaround exists. The only stopgap is to keep untrusted input away from the
field_typeparameter ofFunctionCallinput fields. Upgrading is strongly preferred.- Does this need authentication or user interaction?
No. The CVSS vector is network, no privileges, no user interaction. It only requires that an attacker can influence the
field_typevalue, for example through an exposed API or untrusted tool or model output.
References
Read for this analysis:
- https://github.com/agno-agi/agno/security/advisories/GHSA-m4w4-3r8h-jw98
- https://github.com/agno-agi/agno/commit/cbf675521d4d2281925a051784a3b94172e56416
- https://nvd.nist.gov/vuln/detail/CVE-2026-35002
- https://github.com/agno-agi/agno/releases/tag/v2.3.24
- https://github.com/pypa/advisory-database/tree/main/vulns/agno/PYSEC-2026-256.yaml
- https://pypi.org/project/agno
- https://www.vulncheck.com/advisories/agno-field-type-eval-injection-arbitrary-code-execution
- https://github.com/advisories/GHSA-m4w4-3r8h-jw98
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
