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

[CVE catalog]

Severity
Medium · CVSS 5.4CVSS: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.

DistributionPackageReleaseVersionStatus
Debianhugosid0.168.0-3fixed
Debianhugoforky0.167.0-7fixed
Debianhugotrixie0.131.0-1vulnerable
Debianhugobookworm0.111.3-1vulnerable
CpehugoNot reported0.165.0fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianhugosourcesid0.166.0-1not yet assignedNot reported[1146720]
Debianhugosourceforky0.166.0-1not yet assignedNot reported[1146720]
Debianhugosourcetrixie(unfixed)not yet assignedNot reported[1146720]
Debianhugosourcebookworm(unfixed)not yet assignedNot reported[1146720]
CpehugocpeNot reported0.165.0Not reportedNVD-CVE-2026-10618Not reported

[Debian bug #1146720]

Notes

[trixie] hugo: Minor issue [bookworm] hugo: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [hugo]Affected
    Details (2)
    • 0.111.3-1 · amd64 · bookworm

      Affected

      nvd · hugo · debian · bookworm; nvd · hugo · debian · 12

    • 0.111.3-1 · arm64 · bookworm

      Affected

      nvd · hugo · debian · bookworm; nvd · hugo · debian · 12

[Debian 13 (Trixie)]

  • [hugo]Affected
    Details (2)
    • 0.131.0-1 · amd64 · trixie

      Affected

      nvd · hugo · debian · 13

    • 0.131.0-1 · arm64 · trixie

      Affected

      nvd · hugo · debian · 13

Observed:

References