CVE-2026-61667: DIRAC Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-m4m7-4cw8-62j6
CVSS 9.9
CWE-89 CWE-95
Published
Advisory Summary

CVE-2026-61667 is a CRITICAL (CVSS 9.9) remote code execution vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting DIRAC libraries in the PyPI ecosystem. The issue involves dirac is vulnerable to rce in filecatalog datasetmanager via sql injection + eval. Remediation is available by upgrading affected packages to version 8.0.79, 9.0.22, 9.1.10.

CVE-2026-61667 at a Glance

CVE Identifier CVE-2026-61667
GHSA Identifier GHSA-m4m7-4cw8-62j6
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product DIRAC
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-61667

To remediate this vulnerability, upgrade all affected DIRAC dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

DIRAC fixed: 8.0.79
pip install DIRAC>=8.0.79
DIRAC fixed: 9.0.22
pip install DIRAC>=9.0.22
DIRAC fixed: 9.1.10
pip install DIRAC>=9.1.10
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show DIRAC

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-61667, inspect your installed packages using pip:

pip show DIRAC

Analyze the terminal output to locate any version of DIRAC in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.0.79), your application is affected.

Note: The pip show DIRAC command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In DIRAC, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-61667 Affected DIRAC Versions

3 component(s)
Fixed Versions:
8.0.799.0.229.1.10
Product / Package Ecosystem Affected Versions Fixed Version
DIRAC
PyPI
≥ 6
< 8.0.79
8.0.79
DIRAC
PyPI
≥ 8.1.0a1
< 9.0.22
9.0.22
DIRAC
PyPI
≥ 9.1.0
< 9.1.10
9.1.10

References

Frequently Asked Questions

What is CVE-2026-61667?
CVE-2026-61667 is a security vulnerability in DIRAC involving DIRAC is vulnerable to RCE in FileCatalog DatasetManager via SQL injection + eval under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which DIRAC versions are affected?
Affected versions include releases prior to 8.0.79, 9.0.22, 9.1.10 across affected packages: DIRAC.
What version fixes CVE-2026-61667?
Upgrading to 8.0.79, 9.0.22, 9.1.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is DIRAC affected?
Yes, DIRAC is affected in releases prior to 8.0.79, 9.0.22, 9.1.10. Upgrade your dependency to 8.0.79, 9.0.22, 9.1.10 or later.
What is the CVSS score of CVE-2026-61667?
CVE-2026-61667 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-61667?
CVE-2026-61667 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check PyPI dependencies for CVE-2026-61667?
Run the dependency tree command: 'pip show DIRAC'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m4m7-4cw8-62j6",
  "modified" : "2026-07-13T18:37:31Z",
  "published" : "2026-07-13T18:37:31Z",
  "aliases" : [ "CVE-2026-61667" ],
  "summary" : "DIRAC is vulnerable to RCE in FileCatalog DatasetManager via SQL injection + eval",
  "details" : "### Summary\nThe 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.\n\n### Details\n\nThe FileCatalog checkDataset function passes its datasets argument directly to the backend DB handler:\nhttps://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/Service/FileCatalogHandler.py#L591-L593\n\nWhich in turn passes it to the __checkDataset function:\nhttps://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L390\n\nThis uses an f-string to create a query without escaping, resulting in an SQL injection:\nhttps://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L400-L402\n\nThe result (which is user controllable due to the SQL injection) is passed into eval almost immediately on return, leading to code execution:\nhttps://github.com/DIRACGrid/DIRAC/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/DIRAC/DataManagementSystem/DB/FileCatalogComponents/DatasetManager/DatasetManager.py#L409\n\nThere are other functions in the same file which use a similar pattern and would likely be exploitable in a similar way.\n\n### Impact\nThis 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.\n\n### Patched versions:\nhttps://pypi.org/project/DIRAC/8.0.79/\nhttps://pypi.org/project/DIRAC/9.0.22/\nhttps://pypi.org/project/DIRAC/9.1.10/",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "DIRAC"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6"
      }, {
        "fixed" : "8.0.79"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "DIRAC"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.1.0a1"
      }, {
        "fixed" : "9.0.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "DIRAC"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.1.0"
      }, {
        "fixed" : "9.1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/DIRACGrid/DIRAC/security/advisories/GHSA-m4m7-4cw8-62j6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/DIRACGrid/DIRAC"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/DIRAC/8.0.79"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/DIRAC/9.0.22"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/DIRAC/9.1.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89", "CWE-95" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-13T18:37:31Z",
    "nvd_published_at" : null
  }
}