Skip to content
OpenAdvisories
Medium · 5.1 CVE-2026-50133 EUVD-2026-41909GHSA-c54g-xjwj-8g82GO-2026-5313

Hugo: XSS via text/html content files

Published Jul 6, 2026 · Updated Jul 7, 2026 · Assigned by GitHub_M

Description

Hugo is a static site generator. Prior to 0.162.0, Hugo accepts content files in several markup formats. Files mapped to the text/html media type (typically .html files under /content, or pages produced by a content adapter that sets content.mediaType = "text/html") had their body emitted verbatim into the rendered page. A site that ingests HTML content from an untrusted source could therefore be served stored cross-site scripting. This vulnerability is fixed in 0.162.0.

Affected products

VendorProductAffectedFixed
gohugoio hugo < 0.162.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 hugo 0.162.1-1 —
Debian 13 hugo No fix yet —
Debian 12 hugo No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 hugo No fix yet —
Ubuntu 26.04 LTS hugo No fix yet —
Ubuntu 25.10 hugo No fix yet —
Ubuntu 22.04 LTS hugo No fix yet —
Ubuntu 20.04 LTS hugo No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS hugo No fix yet —
Ubuntu 16.04 LTS hugo No fix yet —
Ubuntu Pro 24.04 LTS hugo No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 hugo 0.163.3-0.1.hum1 RHSA-2026:36862
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 govulncheck-vulndb 0.0.20260723T184607-160000.1.1 openSUSE-SU-2026:21483-1

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/gohugoio/hugo < 0.162.0 0.162.0 GHSA-c54g-xjwj-8g82

Advisories 2

References