
CVE catalog
CVE-2026-10618
Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go co
- Severity
- Medium · CVSS 5.4
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N - Published
- Updated
- Source
- [NVD] · [CVE record]
- EPSS
- 0.30% · Oct 25, 2026
Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. The function's documentation states that it performs HTML escaping of string attributes, which it does not. A quote inside an attribute value in the info string therefore terminates the attribute and allows a further attribute, including an event handler, to be placed on the wrapper element, and the script runs for every visitor who loads the page. This path is reached under the default configuration, with code fences enabled and without goldmark's unsafe setting or any custom render hook. Attribute names beginning with on are filtered when the attributes are parsed, so injection is achieved through the value rather than the name.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | hugo | sid | 0.168.0-3 | fixed |
| Debian | hugo | forky | 0.167.0-7 | fixed |
| Debian | hugo | trixie | 0.131.0-1 | vulnerable |
| Debian | hugo | bookworm | 0.111.3-1 | vulnerable |
| Cpe | hugo | Not reported | 0.165.0 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | hugo | source | sid | 0.166.0-1 | not yet assigned | Not reported | [1146720] |
| Debian | hugo | source | forky | 0.166.0-1 | not yet assigned | Not reported | [1146720] |
| Debian | hugo | source | trixie | (unfixed) | not yet assigned | Not reported | [1146720] |
| Debian | hugo | source | bookworm | (unfixed) | not yet assigned | Not reported | [1146720] |
| Cpe | hugo | cpe | Not reported | 0.165.0 | Not reported | NVD-CVE-2026-10618 | Not reported |
Notes
[trixie] hugo: Minor issue [bookworm] hugo: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [hugo]Affected
Details (2)
0.111.3-1· amd64 · bookwormAffected
nvd · hugo · debian · bookworm; nvd · hugo · debian · 12
0.111.3-1· arm64 · bookwormAffected
nvd · hugo · debian · bookworm; nvd · hugo · debian · 12
[Debian 13 (Trixie)]
- [hugo]Affected
Details (2)
0.131.0-1· amd64 · trixieAffected
nvd · hugo · debian · 13
0.131.0-1· arm64 · trixieAffected
nvd · hugo · debian · 13
Observed:
References
- [https://nvd.nist.gov/vuln/detail/CVE-2026-10618]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-10618]
- [https://security-tracker.debian.org/tracker/CVE-2026-10618]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-10618.json]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]