NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Agno

CVE-2026-10105: agno contains a SQL injection vulnerability

highCVSS 4.0 8.7 · 3.1 8.3GHSA-82m5-3pcp-hccq

agno 2.6.5 has a SQL injection in its ClickHouse vector database backend. `delete_by_metadata()` puts metadata keys and values straight into SQL, so an attacker who controls them can delete every row or read data through error-based or blind injection. The advisory data lists no patched version. The maintainer says the fix shipped in agno 2.8.5.

Published May 29, 2026 · Updated Jul 2, 2026 · Analysis Oct 26, 2026

What an attacker can do

In agno/vectordb/clickhouse/clickhousedb.py, delete_by_metadata(metadata) builds its WHERE clause with f-strings. The string branch looks like JSONExtractString(toString(filters), '{key}') = '{value}', and the numeric and boolean branches interpolate the key the same way. The result goes to self.client.command(). Table and database names are bound as ClickHouse identifiers, but the WHERE content is not escaped (CWE-89).

The attacker must be able to influence the metadata dict. That happens when an application passes user input into it, for example an API endpoint that accepts metadata filters for deleting documents from a knowledge base. The CVSS vector requires low privileges, so a normal account on such an endpoint is enough.

The issue report shows that a value like ' OR '1'='1 makes the delete match every row and wipes the table. A crafted key does the same. The advisory also lists targeted row deletion and error-based or blind extraction of other data. In a shared deployment, one tenant's request could delete or read another tenant's vectors.

Who is affected

The agno package on PyPI, version 2.6.5 and earlier per the advisory data. A comment in the issue says v2.7.1 was still affected. Only apps that use the ClickHouse vector database backend and call delete_by_metadata() with caller-supplied metadata are exposed. Check:

pip show agno

Then search your code for delete_by_metadata and see where its argument comes from.

agno

Ecosystem
PyPI
Affected
<= 2.6.5
Fixed in
No patched version yet
Check
pip show agno

How to fix it

The advisory data lists no patched version. The fix is pull request 7883, merged to main on July 27, 2026 as commit 6780513. A maintainer comment in the issue says it shipped in agno 2.8.5. The page for the pull request does not confirm the release, so check that your installed version contains it:

pip install --upgrade agno

The change replaces the f-string WHERE builder with ClickHouse named parameters (meta_key_N and meta_val_N), so neither the raw key nor the raw value appears in the SQL. Until you are on a fixed release, do not pass untrusted input into delete_by_metadata(). Validate keys against an allow-list.

How to tell if you were hit

Look in the ClickHouse query log for DELETE statements from the agno client with OR, quotes or comment sequences inside the JSONExtractString condition. Unexpected loss of rows from the vector table is a sign of a tautology delete. Look for SQL syntax errors in the application logs after metadata-filter requests, which point to error-based probing. Check the API logs for requests whose metadata keys or values contain quote characters.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

agno 2.6.5 contains a SQL injection vulnerability in the ClickHouse vector database backend that allows attackers to inject arbitrary SQL expressions by supplying malicious metadata keys and values to the delete_by_metadata() method. Attackers can exploit the unsafe f-string interpolation in clickhousedb.py to delete all rows, target specific rows, or extract information through error-based or blind SQL injection techniques.

Questions

Which agno version fixes CVE-2026-10105?

The advisory data names none. A maintainer says the fix shipped in 2.8.5, and the fix itself is pull request 7883 merged on July 27, 2026. Verify the release you install includes it.

Am I affected if I use another vector database?

The advisory describes the ClickHouse backend in clickhousedb.py only. Other backends are not covered by it.

Does the attacker need to be authenticated?

The CVSS vector needs low privileges. In practice the attacker needs a way to feed metadata into delete_by_metadata(), such as an API endpoint that accepts metadata filters.

Is it exploited in the wild?

The sources do not say so, and there is no CISA KEV flag. The issue report includes a working tautology example.

References

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

More Agno vulnerabilities

All Agno entries