GHSA-c54g-xjwj-8g82

Suggest an improvement
Source
https://github.com/advisories/GHSA-c54g-xjwj-8g82
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-c54g-xjwj-8g82/GHSA-c54g-xjwj-8g82.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-c54g-xjwj-8g82
Aliases
Downstream
Published
2026-06-16T19:22:14Z
Modified
2026-07-07T20:41:31.090205512Z
Severity
  • 5.1 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N CVSS Calculator
Summary
Hugo: XSS via text/html content files
Details

Commit: e41a06447dDisallow 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:

[security]
allowContent = ['.*']

This only affects pages whose source file (or content adapter output) declares an HTML media type; Markdown, AsciiDoc, Org, Pandoc and reStructuredText content is unaffected.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "MODERATE",
    "github_reviewed_at": "2026-06-16T19:22:14Z",
    "github_reviewed": true
}
References

Affected packages

Go / github.com/gohugoio/hugo

Package

Name
github.com/gohugoio/hugo
View open source insights on deps.dev
Purl
pkg:golang/github.com/gohugoio/hugo

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.162.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-c54g-xjwj-8g82/GHSA-c54g-xjwj-8g82.json"