---
id: "CVE-2026-61667"
page: "https://infrastack.ai/live/CVE-2026-61667"
kind: "vulnerability"
aliases: ["CVE-2026-61667", "GHSA-m4m7-4cw8-62j6"]
title: "DIRAC is vulnerable to RCE in FileCatalog DatasetManager via SQL injection + eval"
severity: "critical"
cvss: 9.9
epss: 0.01213
exploited: false
status: "open"
category: "package"
products: [{"name": "DIRAC", "fixed": ["8.0.79"], "affected": ">= 6, < 8.0.79", "ecosystem": "pypi"}, {"name": "DIRAC", "fixed": ["9.0.22"], "affected": ">= 8.1.0a1, < 9.0.22", "ecosystem": "pypi"}, {"name": "DIRAC", "fixed": ["9.1.10"], "affected": ">= 9.1.0, < 9.1.10", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-89", "cwe-95", "dirac", "filecatalog", "grid-computing", "package", "python"]
not_affected_if: ["client-only", "no-filecatalog-service", "patched-version"]
published_at: "2026-07-13T18:37:31+00:00"
first_seen_at: "2026-11-10T19:40:05+00:00"
updated_at: "2026-11-10T20:04:55+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-m4m7-4cw8-62j6", "first_seen_at": "2026-11-10T19:40:05+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-61667", "first_seen_at": "2026-11-10T20:15:32+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.01213, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-61667"}]
---

# DIRAC is vulnerable to RCE in FileCatalog DatasetManager via SQL injection + eval

Link for people: https://infrastack.ai/live/CVE-2026-61667 (this .md is for agents)

DIRAC's FileCatalog DatasetManager builds a SQL query with an f-string and passes the result into Python's eval. An authenticated user can inject SQL to control that result and run arbitrary commands on the server.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:DIRAC affected >= 6, < 8.0.79 fixed 8.0.79
- pypi:DIRAC affected >= 8.1.0a1, < 9.0.22 fixed 9.0.22
- pypi:DIRAC affected >= 9.1.0, < 9.1.10 fixed 9.1.10

## How to check

- Check the installed DIRAC version with `pip show DIRAC`
- Compare it against the fixed versions: `8.0.79`, `9.0.22`, `9.1.10`
- Confirm whether the FileCatalog service is deployed and reachable by users

## Fix

- DIRAC 6 to below `8.0.79`: move to `8.0.79`
- DIRAC 8.1.0a1 to below `9.0.22`: move to `9.0.22`
- DIRAC 9.1.0 to below `9.1.10`: move to `9.1.10`

## Timeline

- 2026-11-10T19:40:05+00:00 ghsa https://github.com/advisories/GHSA-m4m7-4cw8-62j6
- 2026-11-10T20:15:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-61667

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/DIRACGrid/DIRAC/security-advisories/GHSA-m4m7-4cw8-62j6
- [advisory] Maintainer's advisory: github.com https://github.com/DIRACGrid/DIRAC/security/advisories/GHSA-m4m7-4cw8-62j6
- [fix] Patch: github.com https://github.com/DIRACGrid/DIRAC/commit/106f6efb40eb7318473fc09fc48083f1f864460a
- [fix] Patch: github.com https://github.com/DIRACGrid/DIRAC/commit/55ecbd729242ddbe06251b57895873cc468f5a1a
- [fix] Patch: github.com https://github.com/DIRACGrid/DIRAC/commit/5a5def88d65a18c77af9f2900ffb5866d6489d62
- [fix] Patch: github.com https://github.com/DIRACGrid/DIRAC/commit/66cfc8bf1dc13a6d38bf0c5654d5b551d76dce9b
- [fix] Patch: github.com https://github.com/DIRACGrid/DIRAC/commit/6f6fe65f27b6913916ef77a77a09918b94029c0a
- [fix] Patch: github.com https://github.com/DIRACGrid/DIRAC/commit/fabf08a4a403fdd92d3445771528fa54b3ee902f
- [fix] Release: github.com https://github.com/DIRACGrid/DIRAC/releases/tag/v8.0.79
- [fix] Release: github.com https://github.com/DIRACGrid/DIRAC/releases/tag/v9.0.22
- [fix] Release: github.com https://github.com/DIRACGrid/DIRAC/releases/tag/v9.1.10

## From the sources

### 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/

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
