Skip to content

← Public intelligence

Go package

github.com/gohugoio/hugo

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

11 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.7GoPublished

    Hugo: security.http.urls deny rules bypassed by alternate IPv4 encodings (SSRF)

    GHSA-r46f-3rpw-hxrv

    Affected
    • Go github.com/gohugoio/hugo >= 0.162.0, < 0.163.1
    Fixed in
    0.163.1· Vendor fix available
    Issue
    Impact The default security.http.urls policy denies requests to loopback, internal, and cloud-metadata IPv4 literals (e.g. http://127.0.0.1/, http://169.254.169.254/). The deny rule only matched dotted-decimal notation, so alternate IPv4 encodings of the same addresses — integer, hex, or octal, which contain no dot — passed the policy: - http://2130706433/ → 127.0.0.1 - http://2852039166/ → 169.254.169.254 (cloud metadata) - http://0x7f000001/, http://017700000001/, http://0/ When a template passes an untrusted or data-derived URL to resources.GetRemote and the host platform uses the cgo system resolver, these encodings resolve to the blocked address — allowing build-time server-side requests to loopback and internal services, including the cloud-metadata endpoint in hosted/CI builds. The same check is reused on redirects, so the gap also applies to each redirect hop. This affects sites that rely on security.http.urls as a security boundary while fetching attacker-influenced remote…

    Recommended action: Upgrade to 0.163.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 6.0GoPublished

    Hugo: Symlink confinement bypass in os.ReadFile

    GHSA-c3wq-j5vh-68rc

    Affected
    • Go github.com/gohugoio/hugo >= 0.123.0, < 0.163.1
    Fixed in
    0.163.1· Vendor fix available
    Issue
    Affected versions: v0.123.0 through v0.163.0. Earlier versions are not affected. Fixed in: v0.163.1. Severity: Medium. Requires the attacker to be able to place (or convince a site author to place) a symlink inside a mounted directory — for example, inside a locally-vendored theme under themes/. Themes mounted as Go modules from GitHub have symlinks stripped on download and are not affected. Multi-directory walks (e.g. content/asset walking) were not affected either; only direct lookups via resources.Get followed symlinks. Description. Hugo's virtual filesystem is designed so that files under a mount cannot reach outside the mount tree. A regression introduced in v0.123.0 caused RootMappingFs.statRoot to call Stat (which follows symlinks) instead of Lstat, so a direct os.ReadFile "somefile" where somefile was a symlink pointing outside the mount would return the target's contents. This effectively let a symlink planted inside a theme or local mount read arbitrary files reachable to…

    Recommended action: Upgrade to 0.163.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. Medium, CVSS 5.1GoPublished

    Hugo: XSS via unescaped code-fence language in default code block renderer

    GHSA-q76j-gcg9-vxc6

    Affected
    • Go github.com/gohugoio/hugo >= 0.60.0, < 0.163.3
    Fixed in
    0.163.3· Vendor fix available
    Issue
    Hugo's default code-block renderer wrote the Markdown code-fence language / 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 is not an issue if you fully trust every file under /content and every content adapter you load.

    Recommended action: Upgrade to 0.163.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. Medium, CVSS 6.9GoPublished

    Hugo: Symlink confinement bypass in resources.Get

    CVE-2026-50135 · GHSA-fw87-fv5r-9fpw

    Affected
    • Go github.com/gohugoio/hugo >= 0.123.0, < 0.162.0
    Fixed in
    0.162.0· Vendor fix available
    Issue
    Commit: f8b5fa09a6 — Fix prevention of direct symlink reads in resources.Get Affected versions: v0.123.0 through v0.161.1. Earlier versions are not affected. Fixed in: v0.162.0. Severity: Medium. Requires the attacker to be able to place (or convince a site author to place) a symlink inside a mounted directory — for example, inside a locally-vendored theme under themes/. Themes mounted as Go modules from GitHub have symlinks stripped on download and are not affected. Multi-directory walks (e.g. content/asset walking) were not affected either; only direct lookups via resources.Get followed symlinks. Description. Hugo's virtual filesystem is designed so that files under a mount cannot reach outside the mount tree. A regression introduced in v0.123.0 caused RootMappingFs.statRoot to call Stat (which follows symlinks) instead of Lstat, so a direct resources.Get "somefile" where somefile was a symlink pointing outside the mount would return the target's contents. This effectively let a…

    Recommended action: Upgrade to 0.162.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  5. UnratedGoPublished

    Hugo: security.http.urls allow-list bypass via HTTP redirects

    CVE-2026-50134 · GHSA-vxgm-5rmg-5w8g

    Affected
    • Go github.com/gohugoio/hugo >= 0.91.0, < 0.162.0
    Fixed in
    0.162.0· Vendor fix available
    Issue
    Commit: 86fbb0f7a8 — security: Validate redirects against security.http.urls Affected versions: v0.91.0 (when security.http.urls was introduced) through v0.161.1. Fixed in: v0.162.0. Severity: Only relevant for sites that rely on security.http.urls as a trust boundary — e.g. CI builds that fetch remote resources but want to constrain which hosts can be reached. Not an issue if you fully trust every URL passed to resources.GetRemote. Description. resources.GetRemote enforces security.http.urls on the URL it is called with, but until v0.162.0 it did not re-validate intermediate URLs on HTTP 3xx redirects. An allowed server (or an attacker controlling its DNS or response) could therefore redirect the request to a host that the policy was meant to forbid — for example, http://localhost/ or an internal IP — and Hugo would fetch from the redirected target. The same bypass also lifted any host-shape restriction the operator had put in place. Mitigation. v0.162.0 installs a CheckRedirect on…

    Recommended action: Upgrade to 0.162.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  6. Medium, CVSS 5.1GoPublished

    Hugo: XSS via text/html content files

    CVE-2026-50133 · GHSA-c54g-xjwj-8g82

    Affected
    • Go github.com/gohugoio/hugo < 0.162.0
    Fixed in
    0.162.0· Vendor fix available
    Issue
    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: This only affects pages whose source file…

    Recommended action: Upgrade to 0.162.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  7. Medium, CVSS 6.2GoPublished

    Hugo's Node tool execution allows file system access outside the project directory

    CVE-2026-44301 · GHSA-x597-9fr4-5857

    Affected
    • Go github.com/gohugoio/hugo >= 0.43.0, < 0.161.0
    Fixed in
    0.161.0· Vendor fix available
    Issue
    Impact When building a Hugo site that uses Node-based asset pipelines (PostCSS, Babel, TailwindCSS), Hugo invoked the configured Node tools without restrictions on file system access. As a result, executing hugo against an untrusted site could allow code running through these tools to read or write files outside the project's working directory. Users who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected. Patches From v0.161.0, Hugo runs Node tools under Node's permission model with strict defaults: No write access and only read access to the site source directories and files. Workarounds Block these tools in security.exec.allow.

    Recommended action: Upgrade to 0.161.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  8. Medium, CVSS 5.3GoPublished

    Hugo: Certain markdown links are not properly escaped

    CVE-2026-35166 · GHSA-mcv8-8m8x-48pg

    Affected
    • Go github.com/gohugoio/hugo >= 0.60.0, < 0.159.2
    Fixed in
    0.159.2· Vendor fix available
    Issue
    Impact Links and image links in the default markdown to HTML renderer are not properly escaped. Hugo users who trust their Markdown content or have custom render hooks for links and images are not affected. Patches Patched in v0.159.2 Workarounds Create custom render hooks for links and images in a Hugo theme/project.

    Recommended action: Upgrade to 0.159.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  9. Medium, CVSS 5.3GoPublished

    Hugo does not escape some attributes in internal templates

    CVE-2024-55601 · GHSA-c2xf-9v2r-r2rx

    Affected
    • Go github.com/gohugoio/hugo >= 0.123.0, < 0.139.4
    Fixed in
    0.139.4· Vendor fix available
    Issue
    Impact Some HTML attributes in Markdown in the internal templates listed below not escaped. Impacted are Hugo users who do not trust their Markdown content files and are using one or more of these templates. default/markup/render-link.html from v0.123.0 default/markup/render-image.html from v0.123.0 default/markup/render-table.html from v0.134.0 shortcodes/youtube.html from v0.125.0 Patches Patched in v0.139.4. Workarounds Replace with user defined templates or disable the internal templates: https://gohugo.io/getting-started/configuration-markup/#renderhooksimageenabledefault References https://github.com/gohugoio/hugo/releases/tag/v0.139.4 https://gohugo.io/about/security/

    Recommended action: Upgrade to 0.139.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  10. Medium, CVSS 6.1GoPublished

    Hugo Markdown titles do not escaped in internal render hooks

    CVE-2024-32875 · GHSA-ppf8-hhpp-f5hj

    Affected
    • Go github.com/gohugoio/hugo >= 0.123.0, < 0.125.3
    Fixed in
    0.125.3· Vendor fix available
    Issue
    Impact Title argument in Markdown for links and images not escaped in internal render hooks. Impacted are Hugo users who have these hooks enabled and do not trust their Markdown content files. Patches Patched in v0.125.3. Workarounds Replace with user defined templates or disable the internal templates: https://gohugo.io/getting-started/configuration-markup/#renderhooksimageenabledefault References https://github.com/gohugoio/hugo/releases/tag/v0.125.3

    Recommended action: Upgrade to 0.125.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  11. High, CVSS 7.7GoPublished

    Hugo can execute a binary from the current directory on Windows

    CVE-2020-26284 · GHSA-8j34-9876-pvfq

    Affected
    • Go github.com/gohugoio/hugo < 0.79.1
    Fixed in
    0.79.1· Vendor fix available
    Issue
    Impact Hugo depends on Go's os/exec for certain features, e.g. for rendering of Pandoc documents if these binaries are found in the system %PATH% on Windows. However, if a malicious file with the same name (exe or bat) is found in the current working directory at the time of running hugo, the malicious command will be invoked instead of the system one. Windows users who run hugo inside untrusted Hugo sites are affected. Patches Users should upgrade to Hugo v0.79.1.

    Recommended action: Upgrade to 0.79.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →