## Hugo highlight wrapperClass option allows stored cross-site scripting

- 種別: advisory
- 重大度: medium
- 関連技術: go, github
- 公開日時: 2026-12-01T02:24:46.000Z
- 情報源: GitHub Advisory Database (https://github.com/advisories/GHSA-4whp-jx7j-xvrm)
- パーマリンク: https://vulnpulse.app/items/ghsa-ghsa-4whp-jx7j-xvrm

影響: go:github.com/gohugoio/hugo >= 0.140.2, < 0.170.0 → 0.170.0
The wrapperClass option of the built-in highlight shortcode (and the transform.Highlight template function) was written unescaped into the wrapping , allowing a content author to inject arbitrary HTML/JavaScript into the rendered page. Details markup/highlight/highlight.go (writeDivStart) wrote wrapperClass directly between class=" and ", while all other attribute values were HTML-escaped. Because the shortcode's options string is decoded into the highlight config, any content author can set wr…