CVE-2024-32657 Hydra has persistent XSS vulnerability serving HTML build outputs
Attackers can execute arbitrary JavaScript in the browser context of Hydra users by serving malicious HTML build artifacts, potentially leading to account takeover.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2024-32657?
CVE-2024-32657 is a medium-severity cross-site scripting vulnerability in NixOS hydra, published on 22 Apr 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Hydra is a Continuous Integration service for Nix based projects. Attackers can execute arbitrary code in the browser context of Hydra and execute authenticated HTTP requests. The abused feature allows Nix builds to specify files that Hydra serves to clients. One use of this functionality is serving NixOS `.iso` files. The issue is only with html files served by Hydra. The issue has been patched on https://hydra.nixos.org around 2024-04-21 14:30 UTC. The nixpkgs package were fixed in unstable and 23.11. Users with custom Hydra packages can apply the fix commit to their local installations. The vulnerability is only triggered when opening HTML build artifacts, so not opening them until the vulnerability is fixed works around the issue.
Weakness: CWE-79
Which versions are affected by CVE-2024-32657?
It affects 1 product.
Products include Nixos Hydra.
How do I fix CVE-2024-32657?
No fix has been published for CVE-2024-32657 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-32657 being exploited?
There is no known exploitation of CVE-2024-32657 in the wild and no public exploit code.
Other vulnerabilities in NixOS hydra
- CVE-2024-45049 Nix Hydra Missing authentication when triggering evaluations
- CVE-2025-54800 Hydra persistent XSS in build metrics
- CVE-2025-54864 Hydra missing authentication when triggering evaluations through GitHub and Gitea plugins
- CVE-2025-32435 Hydra no restricted eval after nix-eval-jobs migration
Sources
Also known as GHSA-2p75-6g9f-pqgx.