{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0.60.0"
              },
              {
                "fixed": "0.163.3"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "f2dea9b036364d3aa380787dd0f495c73792ad95"
            },
            {
              "fixed": "4d22555aebf458d5d150500c9ac4bee5b24cf0d3"
            },
            {
              "fixed": "ce1a7e0bce3713af40496ded3c2c0ceeed49231d"
            }
          ],
          "repo": "https://github.com/gohugoio/hugo",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-q76j-gcg9-vxc6"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58402.json"
  },
  "details": "Hugo is a static site generator. From 0.60.0 until 0.163.3, Hugo's default code-block renderer wrote the Markdown code-fence language or info-string into the code class=\"language-…\" data-lang=\"…\" wrapper without HTML escaping. A fence info-string containing a quote and a script payload breaks out of the attribute and injects a live script element. This issue is fixed in 0.163.3.",
  "id": "CVE-2026-58402",
  "modified": "2026-07-09T03:52:31.184954578Z",
  "published": "2026-07-06T19:19:58.754Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/gohugoio/hugo/releases/tag/v0.163.3"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58402.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-58402"
    },
    {
      "type": "FIX",
      "url": "https://github.com/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231d"
    },
    {
      "type": "FIX",
      "url": "https://github.com/gohugoio/hugo/pull/15051"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Hugo default code block renderer XSS via unescaped code-fence language"
}