{"id":"CVE-2026-61667","kind":"vulnerability","aliases":["CVE-2026-61667","GHSA-m4m7-4cw8-62j6"],"related":[],"title":"DIRAC is vulnerable to RCE in FileCatalog DatasetManager via SQL injection + eval","description":"### 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/","summary":"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.","severity":"critical","cvss":9.9,"epss":0.01213,"exploited":false,"exploited_at":null,"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"],"how_to_check":"- Check the installed DIRAC version with `pip show DIRAC`\n- Compare it against the fixed versions: `8.0.79`, `9.0.22`, `9.1.10`\n- Confirm whether the FileCatalog service is deployed and reachable by users","fix":"- DIRAC 6 to below `8.0.79`: move to `8.0.79`\n- DIRAC 8.1.0a1 to below `9.0.22`: move to `9.0.22`\n- DIRAC 9.1.0 to below `9.1.10`: move to `9.1.10`","status":"open","published_at":"2026-07-13T18:37:31+00:00","first_seen_at":"2026-11-10T19:40:05+00:00","triaged_at":"2026-11-10T20:04:55+00:00","updated_at":"2026-11-10T20:04:55+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-10T20:04:55Z","model":"claude-haiku-5-5","output":{"fix":"- DIRAC 6 to below `8.0.79`: move to `8.0.79`\n- DIRAC 8.1.0a1 to below `9.0.22`: move to `9.0.22`\n- DIRAC 9.1.0 to below `9.1.10`: move to `9.1.10`","reach":"network","title":"DIRAC: SQL injection in FileCatalog feeds eval, enabling server code execution","impact":"high","summary":"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.","audience":"businesses","category":"package","nicknames":[],"who_cares":["dirac","python","grid-computing","filecatalog"],"confidence":0.85,"fix_status":"available","needs_auth":"yes","worst_case":"Authenticated user runs commands on server, reads secrets and proxies","analyst_note":"Confirm the FileCatalog service default enablement and whether the vulnerable checkDataset path is reachable in default configs; see the GHSA-m4m7-4cw8-62j6 advisory.","how_to_check":"- Check the installed DIRAC version with `pip show DIRAC`\n- Compare it against the fixed versions: `8.0.79`, `9.0.22`, `9.1.10`\n- Confirm whether the FileCatalog service is deployed and reachable by users","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["patched-version","no-filecatalog-service","client-only"],"who_is_affected":"Exposure requires running a DIRAC FileCatalog service that accepts requests from authenticated users, since the flaw sits in the DatasetManager reached through checkDataset. Installations that only use DIRAC client tools without the FileCatalog service, or that run versions at or above the fixed releases, are not affected. Teams running DIRAC grid infrastructure should look at the FileCatalog handler in their deployment.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000925,"input_tokens":5543,"output_tokens":742,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':14A,22A '-61667':15A,23A '-89':28B '-95':30B '/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l390':146C '/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l400-l402':166C '/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l409':192C '/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/service/filecataloghandler.py#l591-l593':134C '/project/dirac/8.0.79/':272C '/project/dirac/9.0.22/':275C '/project/dirac/9.1.10/':278C '4cw8':19A '62j6':20A 'allow':100C,217C,228C 'almost':182C 'also':259C 'arbitrari':71B 'argument':125C 'authent':60B,102C,219C 'backend':129C 'build':42B 'checkdataset':120C,142C 'code':115C,188C 'command':72B,223C 'compromis':231C 'comput':35B 'contain':95C 'control':66B,105C,172C 'creat':154C 'cve':13A,21A 'cwe':27B,29B 'databas':85C,243C 'dataset':124C 'datasetmanag':8A,41B,79C 'db':130C 'detail':117C 'dirac':1A,24A,25A,26A,31B,38B,234C 'dirac.cfg':241C 'direct':126C 'due':173C 'escap':158C 'eval':12A,58B,91C,111C,181C 'evid':261C 'execut':116C,189C 'exploit':210C,264C 'export':246C 'f':49B,151C 'f-string':48B,150C 'file':200C 'filecatalog':7A,32B,40B,78C,119C 'full':230C 'function':121C,143C,196C 'get':242C 'ghsa':17A 'ghsa-m4m7-4cw8-62j6':16A 'github.com':133C,145C,165C,191C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l390':144C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l400-l402':164C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l409':190C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/service/filecataloghandler.py#l591-l593':132C 'grid':34B 'grid-comput':33B 'handler':131C 'immedi':183C 'impact':215C 'inject':11A,63B,97C,163C,177C 'lead':186C 'like':208C 'local':240C,253C 'log':254C,267C 'm4m7':18A 'packag':36B 'paramet':107C 'pass':52B,87C,122C,138C,179C 'password':244C 'patch':268C 'pattern':205C 'proxi':249C 'pypi.org':271C,274C,277C 'pypi.org/project/dirac/8.0.79/':270C 'pypi.org/project/dirac/9.0.22/':273C 'pypi.org/project/dirac/9.1.10/':276C 'python':37B,56B 'queri':45B,82C,94C,156C 'rce':5A 'read':238C 'remot':114C 'remov':260C 'result':54B,68B,89C,112C,159C,168C 'return':108C,185C 'run':70B,80C,222C 'server':75B,226C 'similar':204C,213C 'sql':10A,44B,64B,93C,162C,176C 'store':248C 'string':50B,152C 'summari':76C 'system':235C 'token':251C 'turn':137C 'use':148C,202C,256C 'user':61B,103C,171C,220C 'version':269C 'via':9A 'vulner':3A,98C 'way':214C 'without':157C 'would':207C","nicknames":[],"mitigations":[],"who_affected":"Exposure requires running a DIRAC FileCatalog service that accepts requests from authenticated users, since the flaw sits in the DatasetManager reached through checkDataset. Installations that only use DIRAC client tools without the FileCatalog service, or that run versions at or above the fixed releases, are not affected. Teams running DIRAC grid infrastructure should look at the FileCatalog handler in their deployment.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["dirac"],"ptokens":["dirac"],"labels":["critical","cwe89","cwe95","dirac","filecatalog","gridcomputing","package","pypi","python"],"campaign_type":null,"search_a":"'-2026':14A,22A '-61667':15A,23A '4cw8':19A '62j6':20A 'cve':13A,21A 'datasetmanag':8A 'dirac':1A,24A,25A,26A 'eval':12A 'filecatalog':7A 'ghsa':17A 'ghsa-m4m7-4cw8-62j6':16A 'inject':11A 'm4m7':18A 'rce':5A 'sql':10A 'via':9A 'vulner':3A","search_b":"'-89':28B '-95':30B 'arbitrari':71B 'authent':60B 'build':42B 'command':72B 'comput':35B 'control':66B 'cwe':27B,29B 'datasetmanag':41B 'dirac':31B,38B 'eval':58B 'f':49B 'f-string':48B 'filecatalog':32B,40B 'grid':34B 'grid-comput':33B 'inject':63B 'packag':36B 'pass':52B 'python':37B,56B 'queri':45B 'result':54B,68B 'run':70B 'server':75B 'sql':44B,64B 'string':50B 'user':61B","search_c":"'/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l390':146C '/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l400-l402':166C '/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l409':192C '/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/service/filecataloghandler.py#l591-l593':134C '/project/dirac/8.0.79/':272C '/project/dirac/9.0.22/':275C '/project/dirac/9.1.10/':278C 'allow':100C,217C,228C 'almost':182C 'also':259C 'argument':125C 'authent':102C,219C 'backend':129C 'checkdataset':120C,142C 'code':115C,188C 'command':223C 'compromis':231C 'contain':95C 'control':105C,172C 'creat':154C 'databas':85C,243C 'dataset':124C 'datasetmanag':79C 'db':130C 'detail':117C 'dirac':234C 'dirac.cfg':241C 'direct':126C 'due':173C 'escap':158C 'eval':91C,111C,181C 'evid':261C 'execut':116C,189C 'exploit':210C,264C 'export':246C 'f':151C 'f-string':150C 'file':200C 'filecatalog':78C,119C 'full':230C 'function':121C,143C,196C 'get':242C 'github.com':133C,145C,165C,191C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l390':144C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l400-l402':164C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/db/filecatalogcomponents/datasetmanager/datasetmanager.py#l409':190C 'github.com/diracgrid/dirac/blob/f7e0a3ac153315030fb3520e8ca747f013758967/src/dirac/datamanagementsystem/service/filecataloghandler.py#l591-l593':132C 'handler':131C 'immedi':183C 'impact':215C 'inject':97C,163C,177C 'lead':186C 'like':208C 'local':240C,253C 'log':254C,267C 'paramet':107C 'pass':87C,122C,138C,179C 'password':244C 'patch':268C 'pattern':205C 'proxi':249C 'pypi.org':271C,274C,277C 'pypi.org/project/dirac/8.0.79/':270C 'pypi.org/project/dirac/9.0.22/':273C 'pypi.org/project/dirac/9.1.10/':276C 'queri':82C,94C,156C 'read':238C 'remot':114C 'remov':260C 'result':89C,112C,159C,168C 'return':108C,185C 'run':80C,222C 'server':226C 'similar':204C,213C 'sql':93C,162C,176C 'store':248C 'string':152C 'summari':76C 'system':235C 'token':251C 'turn':137C 'use':148C,202C,256C 'user':103C,171C,220C 'version':269C 'vulner':98C 'way':214C 'without':157C 'would':207C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-07-13T14:56:51+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-m4m7-4cw8-62j6","url":"https://github.com/advisories/GHSA-m4m7-4cw8-62j6","severity":"critical","published_at":"2026-07-13T18:37:31+00:00","modified_at":"2026-11-10T19:39:09+00:00","first_seen_at":"2026-11-10T19:40:05+00:00","fetched_at":"2026-11-10T20:56:29+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-61667","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61667","severity":null,"published_at":"2026-09-15T18:17:27+00:00","modified_at":"2026-09-30T17:51:56+00:00","first_seen_at":"2026-11-10T20:15:32+00:00","fetched_at":"2026-11-10T20:15:32+00:00","note":null}],"documents":[{"id":117611,"url":"https://api.github.com/repos/DIRACGrid/DIRAC/security-advisories/GHSA-m4m7-4cw8-62j6","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":117612,"url":"https://github.com/DIRACGrid/DIRAC/security/advisories/GHSA-m4m7-4cw8-62j6","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-07-13T14:56:51+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":117613,"url":"https://github.com/DIRACGrid/DIRAC/commit/106f6efb40eb7318473fc09fc48083f1f864460a","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":117614,"url":"https://github.com/DIRACGrid/DIRAC/commit/55ecbd729242ddbe06251b57895873cc468f5a1a","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":117615,"url":"https://github.com/DIRACGrid/DIRAC/commit/5a5def88d65a18c77af9f2900ffb5866d6489d62","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":117616,"url":"https://github.com/DIRACGrid/DIRAC/commit/66cfc8bf1dc13a6d38bf0c5654d5b551d76dce9b","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":117617,"url":"https://github.com/DIRACGrid/DIRAC/commit/6f6fe65f27b6913916ef77a77a09918b94029c0a","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":117618,"url":"https://github.com/DIRACGrid/DIRAC/commit/fabf08a4a403fdd92d3445771528fa54b3ee902f","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":117608,"url":"https://github.com/DIRACGrid/DIRAC/releases/tag/v8.0.79","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":117609,"url":"https://github.com/DIRACGrid/DIRAC/releases/tag/v9.0.22","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":117610,"url":"https://github.com/DIRACGrid/DIRAC/releases/tag/v9.1.10","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.01213,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-61667"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}