All vulnerabilities

Servers and applications

CVE-2026-50133

XSS via text/html content files

Severity
Medium
Published
28 May 2026
Last changed
3 Jun 2026
Added to UpHeron
3 Nov 2026
Fixed in
0.162.0
Exploit chance
0.3% in the next 30 daysHigher than 26% of CVEs. EPSS by FIRST, 19 Nov 2026
Also known as
GHSA-c54g-xjwj-8g82
Sources
Project advisories (GitHub)

Description

Commit: e41a06447d — _Disallow HTML content by default_ Affected versions: all Hugo versions prior to v0.162.0. Fixed in: v0.162.0. Severity: Low to Medium, depending on threat model. Not an issue if you fully trust every file under /content and every content adapter you load.

Description. 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 — for example, a CMS-backed editor, a content adapter pulling from an external API, or an automated import pipeline — could therefore be served stored cross-site scripting.

Mitigation. v0.162.0 introduces a security.allowContent whitelist with text/html denied by default. Sites that intentionally author HTML content can opt back in:

From gohugoio/hugo's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
HugoServers and applications · github:gohugoio/hugo
  • Every version before 0.162.0

About Hugo

static site and RSS generator written in Go

From Wikidata, CC0 1.0.
Share of all websites
0.1%W3Techs, Nov 2026
GitHub stars
90,472GitHub, 15 Nov 2026
Forks
8,450GitHub, 15 Nov 2026
Latest release
v0.170.0GitHub, 15 Nov 2026
Released
13 Nov 2026GitHub
Developer
Bjorn Erik PedersenWikidata
License
Apache Software License 2.0Wikidata
Written in
GoWikidata
First released
2013Wikidata
First published on GitHub
4 Jul 2013GitHub

References