A SQL injection vulnerability in FilterEngine.create_postgres_query 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 postgres_meta 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.
Will follow in two weeks (2025-05-19).
Vulnerability type: SQL Injection (CWE-89)
Who is impacted:
postgres_meta metadata plugin.What an attacker can do:
INSERT/UPDATE/DELETE operations.COPY ... FROM PROGRAM if the database user has superuser or pg_execute_server_program privileges.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
identities (password hashes and salts), tokens (active authentication sessions), accounts (user enumeration), rse_settings (storage endpoint credentials), and rules (data management policies) could be extracted.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_reviewed": true,
"github_reviewed_at": "2026-05-06T16:44:07Z",
"cwe_ids": [
"CWE-89"
],
"severity": "CRITICAL",
"nvd_published_at": "2026-05-06T18:16:02Z"
}