Advisory

GHSA-7xw9-549r-8jrc

Also known as: None

Summary

DIRAC: SQL injection and lack of access control in PilotManager service

Details

Details
A 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:
https://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/Service/PilotManagerHandler.py#L343-L349

https://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.py#L117

This 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.

Further 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:
https://github.com/DIRACGrid/DIRAC/blob/1738e7c6d2f31d26f1364255d9d2e87b4896c922/src/DIRAC/WorkloadManagementSystem/ConfigTemplate.cfg#L111-L118

This 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.

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/

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-07-13 18:38 UTC
Modified
2026-11-10 19:46 UTC

Affected packages and fixes

dirac

PyPI · All systems

Affected

  • introduced 6, fixed 8.0.79 (ecosystem)

Fixed versions

8.0.79

Fix

  • Fixed version 8.0.79
    pip install --upgrade dirac==8.0.79

dirac

PyPI · All systems

Affected

  • introduced 8.1.0a1, fixed 9.0.22 (ecosystem)

Fixed versions

9.0.22

Fix

  • Fixed version 9.0.22
    pip install --upgrade dirac==9.0.22

dirac

PyPI · All systems

Affected

  • introduced 9.1.0, fixed 9.1.10 (ecosystem)

Fixed versions

9.1.10

Fix

  • Fixed version 9.1.10
    pip install --upgrade dirac==9.1.10

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences