{"id":"GHSA-7xw9-549r-8jrc","aliases":["GHSA-7xw9-549r-8jrc"],"related":[],"kind":"vulnerability","state":"published","title":"DIRAC: SQL injection and lack of access control in PilotManager service","summary":"### Details\nA number of the functions in PilotManager pass parameters directly through to the database layer, which then does not do any escaping on the parameters. For example setPilotStatus:\nhttps://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/Service/PilotManagerHandler.py#L343-L349\n\nhttps://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.py#L117\n\nThis won't accept multiple statements separated by a semicolon, but a carefully crafted set of parameters containing SQL escapes would likely be able to change or return other database entries.\n\nFurther to this, the PilotManager access control is only set to \"authenticated\"; this allows these functions to be called by any user. This allows any user to manage (e.g. delete, read output of) any pilot pilot job:\nhttps://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/ConfigTemplate.cfg#L111-L118\n\nThis is fixed by changing the SQL statements to use proper parameter substitution and providing a suitable set of access rules for the exported pilot management functions.\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/","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Details\nA number of the functions in PilotManager pass parameters directly through to the database layer, which then does not do any escaping on the parameters. For example setPilotStatus:\nhttps://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/Service/PilotManagerHandler.py#L343-L349\n\nhttps://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.py#L117\n\nThis won't accept multiple statements separated by a semicolon, but a carefully crafted set of parameters containing SQL escapes would likely be able to change or return other database entries.\n\nFurther to this, the PilotManager access control is only set to \"authenticated\"; this allows these functions to be called by any user. This allows any user to manage (e.g. delete, read output of) any pilot pilot job:\nhttps://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/ConfigTemplate.cfg#L111-L118\n\nThis is fixed by changing the SQL statements to use proper parameter substitution and providing a suitable set of access rules for the exported pilot management functions.\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/","format":"markdown","source":"ghsa"}],"published":"2026-07-13T18:38:13.000Z","modified":"2026-11-10T19:46:29.026Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N","score":8.5,"rating":"HIGH"}],"cwes":["CWE-89","CWE-284"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"6","status":"affected","fixed":"8.0.79"}],"ecosystem":"PyPI","package":"dirac","purl":"pkg:pypi/dirac","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.1.0a1","status":"affected","fixed":"9.0.22"}],"ecosystem":"PyPI","package":"dirac","purl":"pkg:pypi/dirac","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"9.1.0","status":"affected","fixed":"9.1.10"}],"ecosystem":"PyPI","package":"dirac","purl":"pkg:pypi/dirac","source":"ghsa"}],"references":[{"url":"https://github.com/DIRACGrid/DIRAC/security/advisories/GHSA-7xw9-549r-8jrc","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/DIRACGrid/DIRAC/commit/8731de576cf96826dbbf505508526ada31efb927","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/DIRACGrid/DIRAC/commit/f67f754d4eef5bf40a8223dab77cf2591808031f","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/DIRACGrid/DIRAC","tags":["package"],"sources":["ghsa"]},{"url":"https://pypi.org/project/DIRAC/8.0.79","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/DIRAC/9.0.22","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/DIRAC/9.1.10","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7xw9-549r-8jrc","url":"https://github.com/advisories/GHSA-7xw9-549r-8jrc","licence":"CC-BY-4.0","modified":"2026-11-10T19:46:29.026Z"}],"updatedAt":"2026-11-25T22:56:34.535Z"}