{"id":"GHSA-7xw9-549r-8jrc","kind":"vulnerability","aliases":["GHSA-7xw9-549r-8jrc"],"related":[],"title":"DIRAC: SQL injection and lack of access control in PilotManager service","description":"### 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/","summary":"DIRAC's PilotManager service passes caller-supplied parameters straight into SQL statements without escaping, enabling SQL injection. Its access control only requires authentication, so any logged-in user can manage pilot jobs, including deleting them and reading their output.","severity":"high","cvss":8.5,"epss":null,"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-284","cwe-89","dirac","grid-computing","package","pypi","self-hosted"],"not_affected_if":["service-not-deployed"],"how_to_check":"- Check the installed DIRAC version with `pip show DIRAC`\n- Look for a PilotManager service running in your DIRAC deployment and confirm whether it is reachable by non-administrative users","fix":"- DIRAC `8.0.79` for the 6.x to 8.0.x line\n- DIRAC `9.0.22` for the 8.1.x to 9.0.x line\n- DIRAC `9.1.10` for the 9.1.x line","status":"open","published_at":"2026-07-13T18:38:13+00:00","first_seen_at":"2026-11-10T19:40:05+00:00","triaged_at":"2026-11-10T20:04:58+00:00","updated_at":"2026-11-10T20:04:58+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-10T20:04:58Z","model":"claude-haiku-5-5","output":{"fix":"- DIRAC `8.0.79` for the 6.x to 8.0.x line\n- DIRAC `9.0.22` for the 8.1.x to 9.0.x line\n- DIRAC `9.1.10` for the 9.1.x line","reach":"network","title":"DIRAC: SQL injection and missing access control in PilotManager service","impact":"high","summary":"DIRAC's PilotManager service passes caller-supplied parameters straight into SQL statements without escaping, enabling SQL injection. Its access control only requires authentication, so any logged-in user can manage pilot jobs, including deleting them and reading their output.","audience":"businesses","category":"package","nicknames":[],"who_cares":["dirac","pypi","grid-computing","self-hosted"],"confidence":0.8,"fix_status":"available","needs_auth":"yes","worst_case":"Authenticated user reads or alters database entries and manages pilot jobs","analyst_note":"","how_to_check":"- Check the installed DIRAC version with `pip show DIRAC`\n- Look for a PilotManager service running in your DIRAC deployment and confirm whether it is reachable by non-administrative users\n- unknown whether other checks are needed; the sources do not say","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["service-not-deployed"],"who_is_affected":"Teams that run DIRAC's workload management PilotManager service and let authenticated users reach it. The flaw sits in the service's database calls and its access rules, so deployments that do not expose the service to other users are less exposed. The sources do not say which configurations are not affected.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"high"},"cost_usd":0.000824,"input_tokens":5213,"output_tokens":606,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-284':26B '-89':28B '/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/configtemplate.cfg#l111-l118':184C '/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/db/pilotagentsdb.py#l117':113C '/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/service/pilotmanagerhandler.py#l343-l349':110C '/project/dirac/8.0.79/':216C '/project/dirac/9.0.22/':219C '/project/dirac/9.1.10/':222C '549r':15A,20A '7xw9':14A,19A '8jrc':16A,21A 'abl':137C 'accept':117C 'access':7A,57B,150C,204C 'allow':158C,168C 'authent':61B,156C 'call':163C 'caller':44B 'caller-suppli':43B 'care':126C 'chang':139C,189C 'comput':32B 'contain':131C 'control':8A,58B,151C 'craft':127C 'cwe':25B,27B 'databas':93C,143C 'delet':73B,174C 'detail':79C 'dirac':1A,22A,23A,24A,29B,38B 'direct':89C 'e.g':173C 'enabl':53B 'entri':144C 'escap':52B,101C,133C 'exampl':106C 'export':208C 'fix':187C 'function':84C,160C,211C 'ghsa':13A,18A 'ghsa-7xw9-549r-8jrc':12A,17A 'github.com':109C,112C,183C 'github.com/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/configtemplate.cfg#l111-l118':182C 'github.com/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/db/pilotagentsdb.py#l117':111C 'github.com/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/service/pilotmanagerhandler.py#l343-l349':108C 'grid':31B 'grid-comput':30B 'host':37B 'includ':72B 'inject':3A,55B 'job':71B,181C 'lack':5A 'layer':94C 'like':135C 'log':65B 'logged-in':64B 'manag':69B,172C,210C 'multipl':118C 'number':81C 'output':78B,176C 'packag':33B 'paramet':46B,88C,104C,130C,196C 'pass':42B,87C 'patch':212C 'pilot':70B,179C,180C,209C 'pilotmanag':10A,40B,86C,149C 'proper':195C 'provid':199C 'pypi':34B 'pypi.org':215C,218C,221C 'pypi.org/project/dirac/8.0.79/':214C 'pypi.org/project/dirac/9.0.22/':217C 'pypi.org/project/dirac/9.1.10/':220C 'read':76B,175C 'requir':60B 'return':141C 'rule':205C 'self':36B 'self-host':35B 'semicolon':123C 'separ':120C 'servic':11A,41B 'set':128C,154C,202C 'setpilotstatus':107C 'sql':2A,49B,54B,132C,191C 'statement':50B,119C,192C 'straight':47B 'substitut':197C 'suitabl':201C 'suppli':45B 'use':194C 'user':67B,166C,170C 'version':213C 'without':51B 'won':115C 'would':134C","nicknames":[],"mitigations":[],"who_affected":"Teams that run DIRAC's workload management PilotManager service and let authenticated users reach it. The flaw sits in the service's database calls and its access rules, so deployments that do not expose the service to other users are less exposed. The sources do not say which configurations are not affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["dirac"],"ptokens":["dirac"],"labels":["cwe284","cwe89","dirac","gridcomputing","high","package","pypi","selfhosted"],"campaign_type":null,"search_a":"'549r':15A,20A '7xw9':14A,19A '8jrc':16A,21A 'access':7A 'control':8A 'dirac':1A,22A,23A,24A 'ghsa':13A,18A 'ghsa-7xw9-549r-8jrc':12A,17A 'inject':3A 'lack':5A 'pilotmanag':10A 'servic':11A 'sql':2A","search_b":"'-284':26B '-89':28B 'access':57B 'authent':61B 'caller':44B 'caller-suppli':43B 'comput':32B 'control':58B 'cwe':25B,27B 'delet':73B 'dirac':29B,38B 'enabl':53B 'escap':52B 'grid':31B 'grid-comput':30B 'host':37B 'includ':72B 'inject':55B 'job':71B 'log':65B 'logged-in':64B 'manag':69B 'output':78B 'packag':33B 'paramet':46B 'pass':42B 'pilot':70B 'pilotmanag':40B 'pypi':34B 'read':76B 'requir':60B 'self':36B 'self-host':35B 'servic':41B 'sql':49B,54B 'statement':50B 'straight':47B 'suppli':45B 'user':67B 'without':51B","search_c":"'/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/configtemplate.cfg#l111-l118':184C '/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/db/pilotagentsdb.py#l117':113C '/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/service/pilotmanagerhandler.py#l343-l349':110C '/project/dirac/8.0.79/':216C '/project/dirac/9.0.22/':219C '/project/dirac/9.1.10/':222C 'abl':137C 'accept':117C 'access':150C,204C 'allow':158C,168C 'authent':156C 'call':163C 'care':126C 'chang':139C,189C 'contain':131C 'control':151C 'craft':127C 'databas':93C,143C 'delet':174C 'detail':79C 'direct':89C 'e.g':173C 'entri':144C 'escap':101C,133C 'exampl':106C 'export':208C 'fix':187C 'function':84C,160C,211C 'github.com':109C,112C,183C 'github.com/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/configtemplate.cfg#l111-l118':182C 'github.com/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/db/pilotagentsdb.py#l117':111C 'github.com/diracgrid/dirac/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/dirac/workloadmanagementsystem/service/pilotmanagerhandler.py#l343-l349':108C 'job':181C 'layer':94C 'like':135C 'manag':172C,210C 'multipl':118C 'number':81C 'output':176C 'paramet':88C,104C,130C,196C 'pass':87C 'patch':212C 'pilot':179C,180C,209C 'pilotmanag':86C,149C 'proper':195C 'provid':199C 'pypi.org':215C,218C,221C 'pypi.org/project/dirac/8.0.79/':214C 'pypi.org/project/dirac/9.0.22/':217C 'pypi.org/project/dirac/9.1.10/':220C 'read':175C 'return':141C 'rule':205C 'semicolon':123C 'separ':120C 'set':128C,154C,202C 'setpilotstatus':107C 'sql':132C,191C 'statement':119C,192C 'substitut':197C 'suitabl':201C 'use':194C 'user':166C,170C 'version':213C 'won':115C 'would':134C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-07-13T18:38:13+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-7xw9-549r-8jrc","url":"https://github.com/advisories/GHSA-7xw9-549r-8jrc","severity":"high","published_at":"2026-07-13T18:38:13+00:00","modified_at":"2026-11-10T19:38:10+00:00","first_seen_at":"2026-11-10T19:40:05+00:00","fetched_at":"2026-11-10T19:40:05+00:00","note":null}],"documents":[{"id":117622,"url":"https://api.github.com/repos/DIRACGrid/DIRAC/security-advisories/GHSA-7xw9-549r-8jrc","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":117623,"url":"https://github.com/DIRACGrid/DIRAC/security/advisories/GHSA-7xw9-549r-8jrc","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":117624,"url":"https://github.com/DIRACGrid/DIRAC/commit/8731de576cf96826dbbf505508526ada31efb927","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":117625,"url":"https://github.com/DIRACGrid/DIRAC/commit/f67f754d4eef5bf40a8223dab77cf2591808031f","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}