# JLSEC-2026-796: XSS via unescaped code-fence language in default code block renderer

- Severity: Medium 5.4 (CVSS:3.1, scored by Julia Security Advisories) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-07-25T03:41:43.685Z
- Modified: 2026-07-25T03:45:04.161Z
- Related: CVE-2026-58402, EUVD-2026-41904

## Description

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.

(As written by Julia Security Advisories.)

## Affected

- Hugo_jll (Julia): before 0.163.3+0

## Every score

- Julia Security Advisories: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Julia Security Advisories: CVSS:4.0 `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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X`

## References

- <https://github.com/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231d> (web)
- <https://github.com/gohugoio/hugo/pull/15051> (web)
- <https://github.com/gohugoio/hugo/releases/tag/v0.163.3> (web)
- <https://github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6> (web)

## Sources

- Julia Security Advisories: [JLSEC-2026-796](https://osv.dev/vulnerability/JLSEC-2026-796), CC-BY-4.0, modified 2026-07-25

---

Page: https://cve.day/JLSEC-2026-796 · Whole record: https://cve.day/JLSEC-2026-796.json · Rebuilt by cve.day 2026-11-25T22:56:26.240Z
