GHSA-r46f-3rpw-hxrv: Hugo Security.http.urls Deny Rules Bypassed By Vulnerability

HIGH
CWE-918
Published
Advisory Summary

GHSA-r46f-3rpw-hxrv is a HIGH security.http.urls deny rules bypassed by vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Hugo libraries in the Go ecosystem. The issue involves security.http.urls deny rules bypassed by alternate ipv4 encodings (ssrf). Remediation is available by upgrading affected packages to version 0.163.1.

GHSA-r46f-3rpw-hxrv at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-r46f-3rpw-hxrv
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Hugo
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-r46f-3rpw-hxrv

To remediate this vulnerability, upgrade all affected Hugo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/gohugoio/hugo fixed: 0.163.1
Upgrade github.com/gohugoio/hugo to 0.163.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/gohugoio/hugo

How to Check if You Are Affected

To determine whether your application is affected by GHSA-r46f-3rpw-hxrv, inspect your project dependencies for Hugo:

inspect dependencies for github.com/gohugoio/hugo

Analyze the terminal output to locate any version of Hugo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.163.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Hugo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 URLs; it does not affect sites that fully trust the URLs they fetch. ### Patches Fixed in **v0.163.1**. Integer/hex/octal IPv4 hosts are now canonicalized to dotted-decimal before the policy is applied, so every encoding of an address is treated alike. No configuration change is required. ### Workarounds Avoid passing untrusted URLs to `resources.GetRemote`, or tighten `security.http.urls` to an explicit allow-list of trusted hosts. ### Affected versions v0.162.0 – v0.163.0 (patched in v0.163.1).

GHSA-r46f-3rpw-hxrv Affected Hugo Versions

1 component(s)
Fixed Versions:
0.163.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gohugoio/hugo
Go
≥ 0.162.0
< 0.163.1
0.163.1

References

Frequently Asked Questions

What is GHSA-r46f-3rpw-hxrv?
GHSA-r46f-3rpw-hxrv is a security vulnerability in Hugo involving security.http.urls deny rules bypassed by alternate IPv4 encodings (SSRF) under CWE-918: Server-Side Request Forgery (SSRF).
Which Hugo versions are affected?
Affected versions include releases prior to 0.163.1 across affected packages: github.com/gohugoio/hugo.
What version fixes GHSA-r46f-3rpw-hxrv?
Upgrading to 0.163.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gohugoio/hugo affected?
Yes, github.com/gohugoio/hugo is affected in releases prior to 0.163.1. Upgrade your dependency to 0.163.1 or later.
What CWE is associated with GHSA-r46f-3rpw-hxrv?
GHSA-r46f-3rpw-hxrv is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Go dependencies for GHSA-r46f-3rpw-hxrv?
Run the dependency tree command: 'inspect dependencies for github.com/gohugoio/hugo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r46f-3rpw-hxrv",
  "modified" : "2026-06-19T19:18:14Z",
  "published" : "2026-06-19T19:18:14Z",
  "aliases" : [ ],
  "summary" : "Hugo: security.http.urls deny rules bypassed by alternate IPv4 encodings (SSRF)",
  "details" : "### Impact\n\n  The default `security.http.urls` policy denies requests to loopback, internal,\n  and cloud-metadata IPv4 literals (e.g. `http://127.0.0.1/`,\n  `http://169.254.169.254/`). The deny rule only matched dotted-decimal notation,\n  so alternate IPv4 encodings of the same addresses — integer, hex, or octal,\n  which contain no dot — passed the policy:\n\n  - `http://2130706433/` → `127.0.0.1`\n  - `http://2852039166/` → `169.254.169.254` (cloud metadata)\n  - `http://0x7f000001/`, `http://017700000001/`, `http://0/`\n\n  When a template passes an untrusted or data-derived URL to\n  `resources.GetRemote` and the host platform uses the\n  cgo system resolver, these encodings resolve to the blocked address — allowing\n  build-time server-side requests to loopback and internal services, including the\n  cloud-metadata endpoint in hosted/CI builds. The same check is reused on\n  redirects, so the gap also applies to each redirect hop.\n\n  This affects sites that rely on `security.http.urls` as a security boundary\n  while fetching attacker-influenced remote URLs; it does not affect sites that\n  fully trust the URLs they fetch.\n\n  ### Patches\n\n  Fixed in **v0.163.1**. Integer/hex/octal IPv4 hosts are now canonicalized to\n  dotted-decimal before the policy is applied, so every encoding of an address is\n  treated alike. No configuration change is required.\n\n  ### Workarounds\n\n  Avoid passing untrusted URLs to `resources.GetRemote`, or\n  tighten `security.http.urls` to an explicit allow-list of trusted hosts.\n\n  ### Affected versions\n\n  v0.162.0 – v0.163.0 (patched in v0.163.1).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gohugoio/hugo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.162.0"
      }, {
        "fixed" : "0.163.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gohugoio/hugo/security/advisories/GHSA-r46f-3rpw-hxrv"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gohugoio/hugo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T19:18:14Z",
    "nvd_published_at" : null
  }
}