REDHAT-BUG-2497467: Medium severity Hugo Hugo vulnerability

Published Jul 6, 2026
·
Updated

Hugo is a static site generator. From 0.60.0 until 0.163.3, Hugo's default code-block renderer wrote the Markdown code-fence language or info-string into the code class="language-…" data-lang="…" wrapper without HTML escaping. A fence info-string containing a quote and a script payload breaks out of the attribute and injects a live script element. This issue is fixed in 0.163.3.

Affected Software

1 affected component
Hugo Hugo>=0.60.0<0.163.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.163.3

Event History

Jul 6, 2026
Data Sourced
via Red Hat·08:02 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Sites generated with affected Hugo versions are exposed when they render Markdown content containing attacker-controlled code-fence info strings. The vulnerable default code-block renderer is involved.

2

What does an attacker need to exploit it?

An attacker needs a way to introduce a crafted Markdown code-fence info string into content that Hugo renders. The info string must contain a quote and script payload that escapes the generated HTML attribute.

3

Are default configurations affected?

Yes. The issue affects Hugo's default code-block renderer, which inserted the code-fence language or info string into HTML attributes without escaping it.

4

What versions are affected and what fixes the issue?

Hugo versions from 0.60.0 through 0.163.3 are identified as affected. The issue is fixed in version 0.163.3.

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