Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain contributor access to Hugo project repository
-
DeliveryInject alternate-encoded IP (hex/int/octal) into template data or partial
-
ExploitBuild triggered in cloud CI pipeline with cgo resolver active
-
Executionresources.GetRemote submits URL, policy check fails to match non-decimal encoding
-
PersistCgo resolver normalizes encoding and issues request to cloud-metadata or internal endpoint
-
ImpactSensitive response (e.g., IAM credentials) returned to build process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all of the following conditions to be met simultaneously: (1) Hugo version exactly v0.162.0 or v0.163.0 - earlier and later versions are not affected; (2) the build must use the cgo-linked system resolver, not the pure-Go resolver (CGO_ENABLED=1 at build time, which is the default for most distributed Hugo binaries); (3) at least one site template must invoke |
| Impact | The official CVSS 4.0 score is 4.6 (CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N). The AT:P (attack requirements present) modifier is the key signal here: exploitation is gated on a specific runtime condition - the cgo system resolver must be active - and on a template design that passes externally-influenced URLs to |
| Exploit ScenarioDerived | An attacker with write access to a Hugo project's data directory or a partial template contributes a URL argument to |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 06, 2026
Build-time SSRF in Hugo static site generator (v0.162.0-v0.163.0) allows bypass of the security.http.urls IP-block policy by supplying loopback or cloud-metadata addresses in alternate IPv4 encodings - integer, hex, or octal - that the deny rule does not recognize but the cgo system resolver silently normalizes and resolves. Templates invoking resources.GetRemote with attacker-influenced or data-derived URLs can reach internal services and cloud-metadata endpoints (e.g., AWS IMDSv1) at build time, a particularly acute risk in CI pipelines and hosted build services where instance credentials are accessible. No public exploit has been identified and the vulnerability is not listed in CISA KEV, but the fix is available in v0.163.1.
RemediationAI
The primary fix is to upgrade to Hugo v0.163.1, which corrects the IPv4 encoding check to cover decimal-integer, hexadecimal, and octal representations. The patched release is available at https://github.com/gohugoio/hugo/releases/tag/v0.163.1; the underlying commit is https://github.com/gohugoio/hugo/commit/a00b5c72ac57afe26df6688ece3ca544a56df372 and the fix PR is https://github.com/gohugoio/hugo/pull/15020. For teams unable to upgrade immediately, three compensating controls are available: first, audit all templates and data files to ensure resources.GetRemote is only called with fully hardcoded, trusted URL constants - this eliminates the attacker-influence prerequisite entirely; second, enforce network-level egress filtering in CI build environments to block outbound connections to 169.254.169.254 and RFC-1918 ranges at the firewall or container security-group level, noting that this does not protect loopback-targeted requests which remain on-host; third, build Hugo with CGO_ENABLED=0 to force the pure-Go resolver, which may handle alternate encodings differently - note this changes DNS resolution behavior globally and should be tested for side effects before deploying to production build pipelines.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Hugo is a Go-based static site generator; during builds it can fetch remote resources via the built-in resources.GetRemote function. To prevent SSRF, Hugo's security.http.urls configuration key maintains a deny list that blocks requests to loopback (127.0.0.0/8), RFC-1918 internals, and cloud-metadata addresses (169.254.169.254). The flaw, classified as CWE-918 (Server-Side Request Forgery), is that the deny-rule implementation only pattern-matched against canonical dotted-decimal IPv4 notation. Alternate representations of the same addresses - decimal integer (e.g., 2130706433 for 127.0.0.1), hexadecimal (0x7f000001), and octal (0177.0.0.1) - are not matched by the rule and therefore bypass the policy. Because the cgo-linked system resolver normalizes these encodings to their canonical form before making the TCP connection, the request still reaches the intended blocked address. The bypass also propagates to redirect handling, so each hop in an HTTP redirect chain is evaluated with the same incomplete check. The CPE for affected versions is cpe:2.3:a:gohugoio:hugo:*:*:*:*:*:*:*:* for v0.162.0 through v0.163.0.
Know when Hugo gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
AC:H reflects dual prerequisites (cgo resolver and attacker-influenced URL); PR:L for contributor-level access; S:C and C:H for cloud-metadata credential exposure across system boundary.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
Hugo is a static site generator. From v0.162.0 through v0.163.0, the default security.http.urls policy denies requests to loopback, internal, and cloud-metadata IPv4 literals, but the deny rule only matched dotted-decimal notation, so alternate IPv4 encodings of the same addresses, including integer, hex, or octal, passed the policy. 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 or CI builds; the same check is reused on redirects, so the gap also applies to each redirect hop. This issue is fixed in v0.163.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem
Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a
Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose
Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack
Symlink-following flaws in Hugo's theme and module mount confinement allow files outside a project's mount roots to be r
Arbitrary file read in Hugo v0.161.0 through v0.165.0 allows an attacker who can contribute content to a Hugo project -
Case-sensitivity bypass in Hugo's security.http.urls IP-literal deny rule lets builds running v0.162.0 through v0.165.x
Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s
Local file disclosure in Hugo v0.162.0 through v0.166.x allows an attacker-controlled theme or module to place a symlink
Path traversal in Hugo's asset pipeline lets a malicious theme or module bundle files from outside the project root into
Path traversal in Hugo's css.Sass transpilation pipeline (all versions before v0.167.0) lets a malicious theme or module
Symlink traversal in Hugo's virtual filesystem (v0.123.0-v0.163.0) allows a symlink planted inside a theme or local moun
EUVD-2026-41918
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB