Rucio has SQL Injection in FilterEngine Oracle JSON Path via DID Search API
A SQL injection vulnerability in the Oracle path of FilterEngine.create_sqla_query allows any authenticated Rucio user to execute arbitrary SQL against the backend database through the DID search endpoint (GET /dids/<scope>/dids/search). Attacker-controlled filter keys and values are interpolated directly into sqlalchemy.text via Python str.format, completely bypassing parameterization. This enables full database compromise including extraction of authentication tokens, password hashes, and all managed data identifiers. The vulnerability is affecting deployments using the default metadata plugin configuration json_meta with Oracle database backends.
The vulnerability exists in lib/rucio/core/did_meta_plugins/filter_engine.py within the create_sqla_query() method. When the database dialect is Oracle, filter expressions for JSON metadata columns are constructed using text() with Python string formatting:
filter_engine.py:552 (string equality — default branch):
```python
expression = text("json_exists({},'$?(@.{} {} \"{}\")')".format(
json_column.key, key, ORACLE_OP_MAP[oper], value))
```
filter_engine.py:548 (boolean branch):
```python
expression = text("json_exists({},'$?(@.{}.boolean() {} \"{}\")')".format(
json_column.key, key, ORACLE_OP_MAP[oper], value))
```
filter_engine.py:550 (numeric branch — value unquoted):
```python
expression = text("json_exists({},'$?(@.{} {} {})')".format(
json_column.key, key, ORACLE_OP_MAP[oper], value))
```
filter_engine.py:542 (wildcard/LIKE branch):
```python
expression = text("json_exists({},'$?(@.{} like \"{}\")')".format(
json_column.key, key, value.replace('*', '%')))
```
Both key and value are attacker-controlled strings derived from HTTP query parameters. The text() function creates a raw SQL fragment — it does not escape or parameterize its contents.
The complete data flow from HTTP request to SQL execution passes through 7 layers with no effective sanitization:
1. HTTP input (dids.py:265-274): Filter keys and values are accepted from query parameters via ast.literal_eval() (which accepts arbitrary Python string literals) or directly from individual query argument names/values.
2. Plugin routing (did_meta_plugins/__init__.py:227-248): Each filter key is checked via manages_key(). For keys that are NOT columns of the DataIdentifier model (e.g., custom metadata keys like custom_key), did_column_meta.manages_key() returns False, and the request falls through to json_meta.manages_key(), which returns True for any key on Oracle ≥12 (json_meta.py:234 → json_implemented() → True).
3. FilterEngine initialization (filter_engine.py:260): The json_meta plugin instantiates FilterEngine with strict_coerce=False (json_meta.py:178). In _coerce_filter_word_to_model_attribute() (line 116), when the key is not an attribute of models.DidMeta and strict=False, the raw string is returned without validation.
4. 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 as strings.
5. Sanity checks (filter_engine.py:149-190): _sanity_check_translated_filters() only validates did_type, name, length, wildcard operators, created_at format, and duplicates. It does not validate arbitrary key names or values for SQL-unsafe characters.
6. SQL construction (filter_engine.py:536-554): On Oracle, the unsanitized key and value strings are interpolated directly into text() via .format().
7. SQL execution (json_meta.py:199,212): The resulting Select statement containing the injected text() clause is executed via session.execute(stmt).
The non-Oracle branch of create_sqla_query() (lines 555-579) uses SQLAlchemy's json_column[key].as_string() accessor, which compiles the key as a bind parameter (%(meta_1)s). This path is not vulnerable. The vulnerability is specific to the Oracle dialect branch that uses text() with .format().
Prerequisites:
json_meta as custom plugin — this is the default)Note on injection technique: The text() fragment is inserted into a SQLAlchemy query that includes additional bind-parameter conditions (e.g., AND system.did_meta.scope = :scope_1). SQL comment (--) cannot be used to discard the trailing syntax because cx_Oracle validates that all registered bind parameters exist in the SQL text, raising ORA-01036 if they are commented out. Instead, the inj
This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.
The score comes from this vector: CVSS:4.0/AV:N/AC:L/AT:N/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
CVE-2026-29080 is classified as CWE-89: SQL Injection. Untrusted input is concatenated into an SQL statement, letting an attacker change the query and reach data the request should not return.
CVE-2026-29080 is recorded against 1 package.
Published on 29 June 2026 and last revised on 2 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
pypi.org (Package)
github.com (Advisory)
rucio has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-89: SQL Injection) in other software:
Details
CVSS:4.0/AV:N/AC:L/AT:N/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
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| rucio | 40.0.0 | 40.1.1 |
References
Similar Threats
Exploit Protection
CVE-2026-29080 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-29080 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.