CVE-2026-50133: Hugo: XSS via text/html content files

Published Jun 16, 2026
·
Updated

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:

toml [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.

Other sources

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.

MITRE

Affected Software

2 affected componentsFixes available
go/github.com/gohugoio/hugo<0.162.0
0.162.0
gohugo Hugo<0.162.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/gohugoio/hugo to a version that resolves this vulnerability.

    Fixed in 0.162.0
  2. Upgrade

    Upgrade Hugo to a version that resolves this vulnerability.

    Fixed in v0.162.0
  3. Configuration

    If you intentionally need to author HTML content, configure [security] allowContent to explicitly allow the relevant HTML media types (the example provided is allowContent = ['.*']); otherwise keep the default where text/html is denied by default.

    Hugo [security] allowContent = ['.*']

Event History

Jun 16, 2026
Advisory Published
via GitHub·07:22 PM
Data Sourced
via GitHub·07:22 PM
DescriptionWeaknessAffected Software
Jul 6, 2026
CVE Published
via MITRE·07:31 PM
Data Sourced
via MITRE·07:31 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-50133?

The severity of CVE-2026-50133 is considered Low to Medium, depending on the specific threat model.

2

How do I fix CVE-2026-50133?

To fix CVE-2026-50133, upgrade to Hugo version 0.162.0 or later.

3

What type of vulnerability is CVE-2026-50133?

CVE-2026-50133 is classified as a Cross-Site Scripting (XSS) vulnerability.

4

Which versions of Hugo are affected by CVE-2026-50133?

All Hugo versions prior to v0.162.0 are affected by CVE-2026-50133.

5

Is CVE-2026-50133 a concern if I trust my files?

CVE-2026-50133 may not be an issue if you fully trust every file under your control.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203