Hugo highlight wrapperClass option allows stored cross-site scripting
受影响
| 软件包 | 受影响版本 | 修复版本 |
|---|---|---|
| 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…
在 X 上接收快讯漏洞利用、重大泄露和故障,附应对措施。
关注 @vulnpulse_app2026/12/01 11:24,GitHub Advisory Database 发布了“Hugo highlight wrapperClass option allows stored cross-site scripting”(类型:漏洞公告)。严重程度为“中危”(medium)。相关技术:Go、GitHub。