Impact
Hydra has multiple APIs to trigger evaluations. None of these featured any authentication, but with GHSA-xv29-v93r-2f5v, this was fixed for the /api/push
endpoint. This endpoint now requires a valid username and password and enough user privileges to be triggered.
There are however two more endpoints which did not receive the same treatment: /api/push-github
and /api/push-gitea
. These can not use the same logic since they are called by the corresponding forge without HTTP Basic authentication. Both forges do however feature HMAC signing with a secret key. Adding verification of said signature ensures that nobody can trigger these endpoints without knowing the secret key.
Triggering an evaluation can be very taxing on the infrastructure when large evaluations are done (like on https://hydra.nixos.org), introducing potential denial of service attacks on the host running the evaluator.
Patches
Apply f7bda02 to your Hydra package and make sure to configure the webhook secrets as outlined in the documentation if you use these features.
Workarounds
Block /api/push-github
and /api/push-gitea
via a reverse proxy.
References
Impact
Hydra has multiple APIs to trigger evaluations. None of these featured any authentication, but with GHSA-xv29-v93r-2f5v, this was fixed for the
/api/push
endpoint. This endpoint now requires a valid username and password and enough user privileges to be triggered.There are however two more endpoints which did not receive the same treatment:
/api/push-github
and/api/push-gitea
. These can not use the same logic since they are called by the corresponding forge without HTTP Basic authentication. Both forges do however feature HMAC signing with a secret key. Adding verification of said signature ensures that nobody can trigger these endpoints without knowing the secret key.Triggering an evaluation can be very taxing on the infrastructure when large evaluations are done (like on https://hydra.nixos.org), introducing potential denial of service attacks on the host running the evaluator.
Patches
Apply f7bda02 to your Hydra package and make sure to configure the webhook secrets as outlined in the documentation if you use these features.
Workarounds
Block
/api/push-github
and/api/push-gitea
via a reverse proxy.References