mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-02 11:42:37 +00:00
e4dc48cf7f
The default fenced-code-block renderer wrote attribute values from the info string into the wrapper element without escaping. New converts each value from a []byte to a string, so RenderAttributes' []byte escaping branch was never reached and values were written verbatim; the class value in writeDivStart was likewise unescaped. A quote in a value could close the attribute and inject a further one, e.g. an event handler. Escape string attribute values too, and escape the class value. See CVE-2026-10618. See #15247. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>