Skip to content
Heist/ feed
Back to feed
Medium

Hydra has persistent XSS vulnerability serving HTML build outputs

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-32657
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 23:34 UTC · Revision 1

Source evidence

Hydra has persistent XSS vulnerability serving HTML build outputs

core-osv · Original source

Published 22 Apr 2024, 22:24 UTC

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.

osv:CVE-2024-32657
Complete source record
{
  "id": "e569b304d3935c0a37c381a8a02781595cb6d1bdaf2e2264054daec6d2f0cf49",
  "url": "https://osv.dev/vulnerability/CVE-2024-32657",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Hydra has persistent XSS vulnerability serving HTML build outputs",
    "summary": "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.",
    "evidence": "osv:CVE-2024-32657",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-32657",
      "aliases": [
        "CVE-2024-32657",
        "GHSA-2p75-6g9f-pqgx"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/nixos/hydra",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "b72528be5074f3e62e9ae2c2ae8ef9c07a0b4dd3"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "b72528be5074f3e62e9ae2c2ae8ef9c07a0b4dd3"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b72528be5074f3e62e9ae2c2ae8ef9c07a0b4dd3"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            },
            {
              "repo": "https://github.com/nixos/nixpkgs",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2c28f1de7cdc10be556d2106108411dd2482794b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "23.11"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:nixos:hydra:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "23.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "23.05-pre",
            "21.11-pre",
            "18.09-beta",
            "18.03-beta",
            "v208",
            "v206",
            "v192",
            "15.09-beta",
            "0.14",
            "0.13",
            "0.4",
            "0.3",
            "0.2",
            "0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-32657.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:40.528964517Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32657.json",
        "https://github.com/NixOS/hydra/security/advisories/GHSA-2p75-6g9f-pqgx",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-32657",
        "https://github.com/NixOS/hydra/commit/b72528be5074f3e62e9ae2c2ae8ef9c07a0b4dd3",
        "https://github.com/NixOS/nixpkgs/pull/306017",
        "https://github.com/NixOS/nixpkgs/pull/306018"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32657.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-32657",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 508027,
  "published_at": "2024-04-22T22:24:06.762+00:00"
}