All vulnerabilities

Servers and applications

GHSA-pq74-mj4h-cjq2

XSS via text/org content files

Severity
Medium
Published
9 Sept 2026
Last changed
9 Sept 2026
Added to UpHeron
3 Nov 2026
Fixed in
0.166.0
Sources
Project advisories (GitHub)

Description

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/org media type. Org export blocks and @@html:...@@ snippets pass raw HTML through unescaped, making text/org vulnerable to Cross-Site Scripting (XSS)

Mitigation. v0.166.0 introduces a security.allowContent whitelist with text/org denied by default. Sites that intentionally author Org Mode content can opt back in:

This only affects pages whose source file (or content adapter output) declares an text/org media type.

From gohugoio/hugo's security advisory.

Affected software

SoftwareAffected versions
HugoServers and applications · github:gohugoio/hugo
  • From 0.56.0 before 0.166.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