CVE-2026-29090: Rucio SQL injection in postgres_meta DID search path compromises PostgreSQL metadata database
Summary
A SQL injection vulnerability exists in Rucio versions 1.30.0 and later before 35.8.5, 38.5.5, 39.4.2, and 40.1.1, in FilterEngine.createpostgresquery(). This allows any authenticated Rucio user to execute arbitrary SQL against the PostgreSQL metadata database through the DID search endpoint (GET /dids/<scope>/dids/search). When the postgresmeta metadata plugin is configured, attacker-controlled filter keys and values are interpolated directly into raw SQL strings via Python .format(), then passed to psycopg3's sql.SQL() which treats the string as trusted SQL syntax.
Depending on the database privileges assigned to the service account, exploitation can expose sensitive tables, modify or delete metadata, access server-side files, or achieve code execution through PostgreSQL features such as COPY ... FROM PROGRAM. This issue affects deployments that explicitly use the postgresmeta metadata plugin. This vulnerability has been fixed in versions 35.8.5, 38.5.5, 39.4.2, and 40.1.1.
Other sources
Summary
A SQL injection vulnerability in FilterEngine.createpostgresquery allows any authenticated Rucio user to execute arbitrary SQL against the configured PostgreSQL metadata database through the DID search endpoint (GET /dids/<scope>/dids/search). When the external metadata plugin postgresmeta is configured, attacker-controlled filter keys and values are interpolated directly into raw SQL statements via Python str.format. This enables full database compromise including data exfiltration, data modification, and potential remote code execution via COPY ... FROM PROGRAM.
Details
Will follow in two weeks (2025-05-19).
Impact
Vulnerability type: SQL Injection (CWE-89)
Who is impacted:
- Rucio deployments that have explicitly configured the postgresmeta metadata plugin.
What an attacker can do:
- Data modification: PostgreSQL stacked queries enable arbitrary INSERT/UPDATE/DELETE operations. - Remote code execution: Via PostgreSQL's COPY ... FROM PROGRAM if the database user has superuser or pgexecuteserverprogram privileges. - File system access: Via COPY ... TO/FROM '/path' if filesystem permissions allow.
Further elevation when the same postgres database and access is used for metadata and for Rucio itself
- Full database read access: Extract any table including identities (password hashes and salts), tokens (active authentication sessions), accounts (user enumeration), rsesettings (storage endpoint credentials), and rules (data management policies) could be extracted. - Password hash extraction: Combined with Rucio's use of single-iteration SHA-256 for password hashing (no KDF), extracted hashes can be cracked at GPU speed. - Authentication token theft: Active bearer tokens can be extracted and used for immediate session hijacking.
Required attacker privileges: Any authenticated Rucio user. Authentication tokens can be obtained via any supported method (userpass, x509, OIDC, SAML, SSH, GSS). No special roles or administrative permissions are required. The GET /dids/<scope>/dids/search endpoint is available to all authenticated users.
— GitHub
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-29090?
CVE-2026-29090 is classified as a high severity SQL injection vulnerability.
How do I fix CVE-2026-29090?
To remediate CVE-2026-29090, upgrade Rucio to version 40.1.1, 39.4.2, 38.5.5, or 35.8.5.
Who is affected by CVE-2026-29090?
Any authenticated Rucio user interacting with the DID search endpoint is affected by CVE-2026-29090.
What can an attacker do with CVE-2026-29090?
An attacker can execute arbitrary SQL queries against the PostgreSQL metadata database due to CVE-2026-29090.
Which Rucio versions are vulnerable to CVE-2026-29090?
Rucio versions from 1.30.0 up to 40.1.1 are vulnerable to CVE-2026-29090.