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.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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.0
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.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.
- Record
CVE-2026-29090- CVSS 4.0
- 9.0 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-89
- Updated
- 2026-11-02
EUVDEUVD-2026-27875
9.0
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.
- Record
EUVD-2026-27875- CVSS 4.0
- 9.0 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-6j7p-qjhg-9947
9.0
Rucio has SQL Injection in FilterEngine PostgreSQL Query Builder via DID Search API
Summary
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.
Details
The vulnerability exists in lib/rucio/core/did_meta_plugins/filter_engine.py within the create_postgres_query() method (lines 408-484). This method builds raw SQL strings via Python .format() across 6 distinct injection points:
filter_engine.py:477 (string equality — default branch):
expression = "{}->>'{}' {} '{}'".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:442 (wildcard/LIKE branch):
expression = "{}->>'{}' LIKE '{}' ".format(jsonb_column, key, value.replace('*', '%'))
filter_engine.py:456 (boolean branch — value unquoted):
expression = "({}->>'{}' )::boolean {} {}".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:462 (numeric branch — value unquoted):
expression = "({}->>'{}' )::float {} {}".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:472 (datetime branch):
expression = "({}->>'{}' )::timestamp {} '{}'".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:479 (non-JSONB column fallback):
expression = "{} {} '{}'".format(key, POSTGRES_OP_MAP[oper], value)
Both key and value are attacker-controlled strings derived from HTTP query parameters. The resulting expression string is concatenated into a larger query string (postgres_query_str) that is then passed to psycopg3's sql.SQL():
# postgres_meta.py:314-316
statement = sql.SQL("SELECT * FROM {} WHERE {} {}").format(
sql.Identifier(self.table),
sql.SQL(postgres_query_str), # <-- UNSANITIZED user-derived string
sql.SQL("LIMIT {}").format(sql.Literal(limit)) if limit else sql.SQL("")
)
sql.SQL() wraps the string as a trusted SQL syntax fragment — it does not escape or parameterize its contents. The statement is then executed via cur.execute(statement) at postgres_meta.py:321.
Why no existing defense blocks this
The data flow from HTTP request to SQL execution passes through multiple layers with no effective sanitization:
-
HTTP input (
dids.py:265-274): Filter keys and values are accepted from query parameters viaast.literal_eval()or directly from individual query argument names/values. The fallback path only excludes 4 reserved keys (type,limit,long,recursive). -
Plugin routing (
did_meta_plugins/__init__.py:227-248): Each filter key is checked viamanages_key().postgres_meta.manages_key()unconditionally returnsTrue(line 345) — it accepts ANY filter key without validation. -
FilterEngine initialization: The
postgres_metaplugin instantiatesFilterEnginewithstrict_coerce=False. Unknown keys pass through_coerce_filter_word_to_model_attribute()as raw strings. -
Value typecasting (
filter_engine.py:275-297):_try_typecast_string()attempts to parse the value as a boolean, datetime, or number. SQL injection strings fail all these parsers and are returned unchanged. -
Sanity checks (
filter_engine.py:149-190):_sanity_check_translated_filters()does not validate arbitrary key names or values for SQL-unsafe characters. -
SQL construction (
filter_engine.py:442-479): The unsanitized key and value strings are interpolated directly into raw SQL strings via.format(). -
SQL execution…
- Record
GHSA-6j7p-qjhg-9947- CVSS 4.0
- 9.0 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
NVD
9.0
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.
- Record
CVE-2026-29090- CVSS 4.0
- 9.0 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.8 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSV
9.0
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.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.
- Record
CVE-2026-29090- CVSS 4.0
- 9.0 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVGHSA-6j7p-qjhg-9947
9.0
Rucio has SQL Injection in FilterEngine PostgreSQL Query Builder via DID Search API
Summary
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.
Details
The vulnerability exists in lib/rucio/core/did_meta_plugins/filter_engine.py within the create_postgres_query() method (lines 408-484). This method builds raw SQL strings via Python .format() across 6 distinct injection points:
filter_engine.py:477 (string equality — default branch):
expression = "{}->>'{}' {} '{}'".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:442 (wildcard/LIKE branch):
expression = "{}->>'{}' LIKE '{}' ".format(jsonb_column, key, value.replace('*', '%'))
filter_engine.py:456 (boolean branch — value unquoted):
expression = "({}->>'{}' )::boolean {} {}".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:462 (numeric branch — value unquoted):
expression = "({}->>'{}' )::float {} {}".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:472 (datetime branch):
expression = "({}->>'{}' )::timestamp {} '{}'".format(jsonb_column, key, POSTGRES_OP_MAP[oper], value)
filter_engine.py:479 (non-JSONB column fallback):
expression = "{} {} '{}'".format(key, POSTGRES_OP_MAP[oper], value)
Both key and value are attacker-controlled strings derived from HTTP query parameters. The resulting expression string is concatenated into a larger query string (postgres_query_str) that is then passed to psycopg3's sql.SQL():
# postgres_meta.py:314-316
statement = sql.SQL("SELECT * FROM {} WHERE {} {}").format(
sql.Identifier(self.table),
sql.SQL(postgres_query_str), # <-- UNSANITIZED user-derived string
sql.SQL("LIMIT {}").format(sql.Literal(limit)) if limit else sql.SQL("")
)
sql.SQL() wraps the string as a trusted SQL syntax fragment — it does not escape or parameterize its contents. The statement is then executed via cur.execute(statement) at postgres_meta.py:321.
Why no existing defense blocks this
The data flow from HTTP request to SQL execution passes through multiple layers with no effective sanitization:
-
HTTP input (
dids.py:265-274): Filter keys and values are accepted from query parameters viaast.literal_eval()or directly from individual query argument names/values. The fallback path only excludes 4 reserved keys (type,limit,long,recursive). -
Plugin routing (
did_meta_plugins/__init__.py:227-248): Each filter key is checked viamanages_key().postgres_meta.manages_key()unconditionally returnsTrue(line 345) — it accepts ANY filter key without validation. -
FilterEngine initialization: The
postgres_metaplugin instantiatesFilterEnginewithstrict_coerce=False. Unknown keys pass through_coerce_filter_word_to_model_attribute()as raw strings. -
Value typecasting (
filter_engine.py:275-297):_try_typecast_string()attempts to parse the value as a boolean, datetime, or number. SQL injection strings fail all these parsers and are returned unchanged. -
Sanity checks (
filter_engine.py:149-190):_sanity_check_translated_filters()does not validate arbitrary key names or values for SQL-unsafe characters. -
SQL construction (
filter_engine.py:442-479): The unsanitized key and value strings are interpolated directly into raw SQL strings via.format(). -
SQL execution…
- Record
GHSA-6j7p-qjhg-9947- CVSS 4.0
- 9.0 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVPYSEC-2026-527
9.0
Rucio has SQL Injection in FilterEngine PostgreSQL Query Builder via DID Search API
Summary
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.
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
postgres_metametadata plugin.
What an attacker can do:
- Data modification: PostgreSQL stacked queries enable arbitrary
INSERT/UPDATE/DELETEoperations. - Remote code execution: Via PostgreSQL's
COPY ... FROM PROGRAMif the database user has superuser orpg_execute_server_programprivileges. - 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),rse_settings(storage endpoint credentials), andrules(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.
- Record
PYSEC-2026-527- CVSS 4.0
- 9.0 Critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H - CVSS 3.1
- 9.9 Critical
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rucioPyPI |
1.30.0 up to 35.8.5 | 35.8.5 |
rucioPyPI |
36.0.0 up to 38.5.5 | 38.5.5 |
rucioPyPI |
39.0.0 up to 39.4.2 | 39.4.2 |
rucioPyPI |
40.0.0 up to 40.1.1 | 40.1.1 |
rucioPyPI |
1.30.0 up to 35.8.5, plus listed versions 1.30.11.30.21.30.31.30.41.30.5 Show 45 moreShow less1.30.61.30.71.30.81.31.01.31.0rc11.31.0rc21.31.0rc31.31.11.31.21.31.31.31.41.31.51.31.61.31.732.0.032.0.0rc132.0.0rc232.1.032.2.032.3.032.3.132.4.032.5.032.5.0.post132.5.132.6.032.6.0.post132.7.032.8.032.8.132.8.232.8.332.8.432.8.532.8.633.0.033.0.0rc133.0.0rc233.0.0rc333.1.033.2.033.2.133.3.033.4.033.4.0.post1 |
35.8.5 |
rucioPyPI |
36.0.0 up to 38.5.5, plus listed versions 36.0.0.post136.0.0.post236.1.036.2.036.3.0 Show 29 moreShow less36.4.036.5.037.0.037.0.0rc137.0.0rc237.0.0rc337.0.0rc437.1.037.1.0.post137.2.037.3.037.4.037.5.037.6.037.7.037.7.138.0.038.0.0rc138.0.0rc238.0.0rc338.1.038.2.038.3.038.4.038.5.038.5.138.5.238.5.338.5.4 |
38.5.5 |
rucioPyPI |
39.0.0 up to 39.4.2, plus listed versions 39.1.039.2.039.3.039.3.139.4.039.4.1 |
39.4.2 |
rucioPyPI |
40.0.0 up to 40.1.1, plus listed versions 40.1.0 |
40.1.1 |
rucioPyPI |
1.30.0 up to 35.8.5, 36.0.0 up to 38.5.5, 39.0.0 up to 39.4.2, 40.0.0 up to 40.1.1, plus listed versions 1.30.11.30.21.30.31.30.41.30.5 Show 45 moreShow less1.30.61.30.71.30.81.31.01.31.0rc11.31.0rc21.31.0rc31.31.11.31.21.31.31.31.41.31.51.31.61.31.732.0.032.0.0rc132.0.0rc232.1.032.2.032.3.032.3.132.4.032.5.032.5.0.post132.5.132.6.032.6.0.post132.7.032.8.032.8.132.8.232.8.332.8.432.8.532.8.633.0.033.0.0rc133.0.0rc233.0.0rc333.1.033.2.033.2.133.3.033.4.033.4.0.post1 |
35.8.538.5.539.4.240.1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-29090 is a critical vulnerability (CVSS 9.0) in Cern Rucio, published May 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.30%, the 22nd percentile. Fixed in rucio 35.8.5.
References
github.com/rucio/rucio/security/advisories/GHSA-6j7p-qjhg-9947
nvd.nist.gov/vuln/detail/CVE-2026-29090
github.com/advisories/GHSA-6j7p-qjhg-9947
github.com/pypa/advisory-database/tree/main/vulns/rucio/PYSEC-2026-527.yaml
github.com/rucio/rucio
pypi.org/project/rucio
github.com/CVEProject/cvelistV5/tree/main/cves/2026/29xxx/CVE-2026-29090.json
Left out here: 111 versions and the rest of 2 source descriptions. The JSON record has them.