VAITP Dataset

← Back to the dataset

CVE-2026-61667

Unauthenticated RCE via unsanitized datasetName in SQL → eval in DIRAC

  • CVSS 9.9
  • 89
  • Input Validation and Sanitization
  • Remote

DIRAC is an interware, meaning a software framework for distributed computing. Prior to versions 8.0.79, 9.0.22, and 9.1.10, DataManagementSystem/Service/FileCatalogHandler.py checkDataset forwards an authenticated caller-controlled datasets value to DatasetManager.py __checkDataset, where datasetName is interpolated into an FC_MetaDatasets SQL query without parameterization. The injected query can control the returned MetaQuery value, which is passed to Python eval and permits command execution as the account running the DIRAC services. Successful exploitation can expose dirac.cfg, database passwords, stored proxies, and tokens, fully compromise the DIRAC system, and allow alteration of local log evidence. This issue is fixed in versions 8.0.79, 9.0.22, and 9.1.10.

CWE
89
CVSS base score
9.9
Published
2026-09-15
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Input Validation and Sanitization
Subcategory
SQL Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
DIRAC
Fixed by upgrading
Yes

Solution

Upgrade DIRAC to version 8.0.79 or later (or 9.0.22 or later, or 9.1.10 or later).

Vulnerable code sample

import sqlite3

class DatasetManager:
    def __init__(self, db):
        self.db = db

    def __checkDataset(self, datasetName):
        # VULNERABLE: string interpolation leads to SQL injection and eval of DB value
        query = f"SELECT MetaQuery FROM FC_MetaDatasets WHERE datasetName='{datasetName}'"
        cur = self.db.execute(query)
        row = cur.fetchone()
        if row:
            meta = row[0]
            return eval(meta)
        return None

class FileCatalogHandler:
    def __init__(self, db):
        self.manager = DatasetManager(db)

    def checkDataset(self, dataset):
        return self.manager.__checkDataset(dataset)

Patched code sample

import sqlite3
import ast

class DatasetManager:
    def __init__(self, db):
        self.db = db

    def __checkDataset(self, datasetName):
        # FIX: use parameterized query and safe literal eval
        query = "SELECT MetaQuery FROM FC_MetaDatasets WHERE datasetName=?"
        cur = self.db.execute(query, (datasetName,))
        row = cur.fetchone()
        if row:
            meta = row[0]
            return ast.literal_eval(meta)
        return None

class FileCatalogHandler:
    def __init__(self, db):
        self.manager = DatasetManager(db)

    def checkDataset(self, dataset):
        return self.manager.__checkDataset(dataset)

Payload

__VAITP_MODEL_REFUSED__

Cite this entry

@misc{vaitp:cve202661667,
  title        = {{Unauthenticated RCE via unsanitized datasetName in SQL → eval in DIRAC}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-61667},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-61667/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::