Rucio SQL injection in postgres_meta DID search path compromises PostgreSQL metadata database
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 35.8.5, 38.5.5, 39.4.2, 40.1.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
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.create_postgres_query()`. 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 `postgres_meta` 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 postgres_meta metadata plugin. This vulnerability has been fixed in versions 35.8.5, 38.5.5, 39.4.2, and 40.1.1.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- rucio rucio
From 1.30.0 · fixed in 35.8.5; From 35.9.0 · fixed in 38.5.5; From 38.6.0 · fixed in 39.4.2; From 40.0.0 · fixed in 40.1.1
- rucioPyPI
From 1.30.0 · fixed in 35.8.5
- rucioPyPI
From 36.0.0 · fixed in 38.5.5
- rucioPyPI
From 39.0.0 · fixed in 39.4.2
- rucioPyPI
From 40.0.0 · fixed in 40.1.1
- rucioPyPI
From 1.30.0 · fixed in 35.8.5; From 36.0.0 · fixed in 38.5.5; From 39.0.0 · fixed in 39.4.2; From 40.0.0 · fixed in 40.1.1