Monitor vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.9
CVE-2026-61667: DIRAC FileCatalog DatasetManager SQL Injection Allows Remote Code Execution
GHSA-m4m7-4cw8-62j6
CVE-2026-61667
Summary
The DIRAC FileCatalog DatasetManager has a security flaw that lets an authenticated user execute malicious code on the system. This is due to an unsecured SQL query that can be manipulated by a user. To fix this, the DIRAC developers should update the query to prevent SQL injection and avoid using the eval function to execute user-controlled code. In the meantime, administrators should consider restricting access to the affected system or service.
What to do
- Update dirac to version 8.0.79.
- Update dirac to version 9.0.22.
- Update dirac to version 9.1.10.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| pip | – | dirac |
>= 6, < 8.0.79 >= 8.1.0a1, < 9.0.22 >= 9.1.0, < 9.1.10 Fix: upgrade to 8.0.79
|
Original title
DIRAC is vulnerable to RCE in FileCatalog DatasetManager via SQL injection + eval
Original description
### Summary
The FileCatalog DatasetManager runs a query on the database and passes the result to eval. The SQL query contains an injection vulnerability which allows an authenticated user to control the parameter returned to the eval resulting in remote code execution.
### Details
The FileCatalog checkDataset function passes its datasets argument directly to the backend DB handler:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/Service/FileCatalogHandler.py#L591-L593
Which in turn passes it to the __checkDataset function:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L390
This uses an f-string to create a query without escaping, resulting in an SQL injection:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L400-L402
The result (which is user controllable due to the SQL injection) is passed into eval almost immediately on return, leading to code execution:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L409
There are other functions in the same file which use a similar pattern and would likely be exploitable in a similar way.
### Impact
This allows any authenticated user to run commands on the server, which allows a full compromise of the DIRAC system (they can read the local dirac.cfg, get database passwords and export all stored proxies and tokens). If local logging is used, they can also remove evidence of the exploit from the log.
### Patched versions:
https://pypi.org/project/DIRAC/8.0.79/
https://pypi.org/project/DIRAC/9.0.22/
https://pypi.org/project/DIRAC/9.1.10/
The FileCatalog DatasetManager runs a query on the database and passes the result to eval. The SQL query contains an injection vulnerability which allows an authenticated user to control the parameter returned to the eval resulting in remote code execution.
### Details
The FileCatalog checkDataset function passes its datasets argument directly to the backend DB handler:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/Service/FileCatalogHandler.py#L591-L593
Which in turn passes it to the __checkDataset function:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L390
This uses an f-string to create a query without escaping, resulting in an SQL injection:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L400-L402
The result (which is user controllable due to the SQL injection) is passed into eval almost immediately on return, leading to code execution:
https://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L409
There are other functions in the same file which use a similar pattern and would likely be exploitable in a similar way.
### Impact
This allows any authenticated user to run commands on the server, which allows a full compromise of the DIRAC system (they can read the local dirac.cfg, get database passwords and export all stored proxies and tokens). If local logging is used, they can also remove evidence of the exploit from the log.
### Patched versions:
https://pypi.org/project/DIRAC/8.0.79/
https://pypi.org/project/DIRAC/9.0.22/
https://pypi.org/project/DIRAC/9.1.10/
ghsa CVSS3.1
9.9
Vulnerability type
CWE-89
SQL Injection
CWE-95
Published: 13 Jul 2026 · Updated: 13 Jul 2026 · First seen: 13 Jul 2026