Agenta SQL injection exposes all tenants' LLM traces; fixed in 0.122.5
A flaw in Agenta's full-text span filter lets any project member with span access read every tenant's LLM traces; the fix shipped in 0.122.5 under a non-security commit message.
Automated engineering analysis by the Khalid Aboubakr Engineering Desk, from the primary sources listed below. Not reviewed by a person before publication. About the desk
Bottom line
Agenta 0.122.5 fixes CVE-2026-142652, and every version up to and including 0.122.4 is affected. Any account that can view spans in one project can read tracing data from every project and tenant. The vendor says there is no workaround, so self-hosted operators should upgrade now and treat trace contents as possibly disclosed.
What happened
GHSA-96p7-33vc-xgf2 (CVE-2026-142652) describes an SQL injection in the full-text content filter of Agenta, an open-source LLMOps platform. The bug is in Agenta's own code, not in PostgreSQL.
The flaw sits in the span query endpoint, POST /api/spans/query. The filter built its SQL by pasting the search value straight into the statement, with no bound parameter and no escaping. The vulnerable function is _handle_fts_field in api/oss/src/dbs/postgres/tracing/utils.py.
According to the advisory:
- A logged-in account with permission to see spans in a single project is enough to abuse the filter.
- Data is read blind, using boolean or timing conditions, and can come from the tracing records of every project and tenant.
- Tracing lives in its own Postgres database. Accounts, API keys and secrets are held elsewhere, in a database this query cannot touch.
The pip package agenta is affected up to and including 0.122.4. Version 0.122.5 is the first patched release.
Fix commit 345d6d3 now passes the search term to websearch_to_tsquery as a bound parameter. Its title, "fix(tracing): bind full-text content filter value as a query parameter", does not mention security.
The vendor published the repository advisory on 12 Oct 2026, the same day as the v0.122.5 release. GitHub reviewed it and added it to the GitHub Advisory Database on 3 Dec 2026, and the CVE records appeared the same day. GitHub rates the issue High, CVSS 7.7 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N), CWE-89.
Why it matters
The "postgresql" label on this CVE is misleading. Nothing in PostgreSQL needs patching, and a database upgrade does nothing. The problem is a string-formatted query in a Python API layer.
What makes it serious is where the query runs. Agenta's tracing store holds the spans of LLM applications. In a typical LLMOps setup that can mean prompts, model outputs and whatever user content flows through them. The evidence does not say exactly what Agenta traces contain by default, so treat that as an inference rather than a confirmed fact.
Any multi-tenant deployment has a tenant-isolation failure: a user from one organisation can read another organisation's traces. For teams in the UK, the EU or the Gulf that route personal or health data through LLM features, this is a data-protection question as much as a security one.
The split-database design genuinely limits the damage. Credentials, API keys and secrets are out of reach, and the CVSS vector rates integrity and availability as unaffected. This is a confidentiality breach of trace data, not a takeover of the platform.
Engineering assessment
Our assessment: the High rating is fair. The privilege needed is low and the skill needed is modest. Blind extraction is slow but can be automated, and the target data is exactly what LLM teams tend to under-classify.
The real exposure depends on deployment shape:
- Multi-tenant or multi-team self-hosted instances are the worst case. Every user with span access in any project is a potential reader of everyone else's traces.
- Single-team self-hosted instances carry less cross-boundary risk. Even so, a contractor or low-privilege member scoped to one project could read projects they should not see.
- The hosted service is not covered by the evidence. Its patch state is unknown.
The disclosure path matters. A repository advisory existed from 12 Oct, but the commit frames the bug as quotes producing "invalid SQL", and the release-note entry reads as a routine fix. That release also lists several other entries explicitly about security alerts in dependencies, so this one did not stand out. Dependency scanners driven by the GitHub Advisory Database, CVE or OSV feeds would likely have stayed silent until 3 Dec. Only teams watching the repository's own security advisories would have seen it in October. If you upgrade on scanner signals alone, you may have been exposed for seven weeks longer than necessary.
The release notes title PR #7529 "bind search and folder prefix values as query parameters", which suggests the release hardened more than the one function named in the advisory. The advisory itself names only the content filter. That is one more reason to take the whole release rather than backport a single line.
The vendor's hardening step deserves scrutiny. A non-superuser role limited to Agenta's databases stops the injection from reaching other databases on a shared Postgres server. It cannot stop reads from the tracing database, because the API legitimately needs that access. Treat it as blast-radius containment for shared clusters, not as mitigation.
Upgrade risk for the fix itself looks low: the change is a few lines, and a regression test covers quoted and SQL-like search terms. But 0.122.5 also bundles many unrelated changes, including dependency updates, Helm chart adjustments and billing features. Regression-test it like any minor release.
Is this you?
- You run a self-hosted Agenta instance on version 0.122.4 or earlier.
- More than one team, customer or tenant shares that instance, or users have span access limited to particular projects.
- Your LLM traces may include prompts, completions or user data you would not want other tenants to see.
- The Agenta API connects to a Postgres server it shares with other applications, under a superuser or broadly privileged role.
- You only use Agenta's hosted service. Your exposure depends on the vendor's patch state, which the evidence does not cover.
What to do
- Upgrade to 0.122.5 or later now. This is the vendor's only remedy, and the advisory says there is no workaround. Check what is installed with
pip show agenta, and confirm the version your deployed API containers or Helm release actually run. - Run regression tests before rollout. Exercise span search with quoted and special-character terms. Also test the other changes bundled in 0.122.5, such as span list memory limits and Postgres pool sizing, which may affect behaviour under load.
- Restrict the database role (vendor-suggested hardening). Run the API under a non-superuser role that can reach only the Agenta databases. This matters most where Postgres is shared with other systems.
- Assess possible disclosure (Not vendor guidance). If you ran a vulnerable version with untrusted or cross-tenant users, review access logs for
POST /api/spans/queryfor unusual volume from single accounts; high request counts with slow responses would fit a blind extraction pattern. Decide whether trace contents trigger notification duties under UK GDPR, EU GDPR or Saudi PDPL. - Reduce what traces hold (Not vendor guidance). Redact or minimise personal data in LLM spans and set retention limits on the tracing store, so leaks like this cost less.
- Tech leads: review upgrade triggers (Not vendor guidance). The commit and release-note entry for this fix did not identify it as a security fix. Subscribe to repository security advisories for LLMOps tooling, not only to changelogs and scanner feeds. Treat observability stores holding LLM traffic as sensitive data stores when designing AI applications.
What we don't know yet
- No source states whether this flaw has been abused against any real deployment.
- Whether Agenta's hosted service was affected, and when it was patched, is not covered by the evidence.
- The advisory gives no detection guidance or indicators.
- It is unclear whether the repository advisory's content and visibility on 12 Oct matched what GitHub published on 3 Dec.
- It is not confirmed whether other filters, such as the folder prefix values mentioned in the release notes, had related exposure.
The desk will watch for vendor statements on these points and update the news coverage accordingly.
Sources
Latest engineering analysis
6 min read
websocket-driver CVE-2026-140003: one request crashes Node, fix changes defaults
A pre-RFC handshake parser in websocket-driver lets one unauthenticated request kill a Node.js process; 0.8.0 fixes it but switches legacy draft support off by default.
5 min read
AWS HealthOmics MCP Server: linted workflow bundles could run code
A search-path flaw in the HealthOmics MCP Server's workflow linting tools means a bundle under inspection may supply code that runs as the server's user, so bundle provenance matters as much as version.
1 min read
NukeViet CVE-2026-94597: upload RCE hinges on Apache mod_php config
A four-step upload bypass in NukeViet becomes remote code execution only on Apache mod_php with short tags enabled, and conflicting registry data on the 4.6 fix may mislead scanners.