Skip to main content

Hugo CVE-2026-58404

| EUVDEUVD-2026-41918 MEDIUM
Server-Side Request Forgery (SSRF) (CWE-918)
2026-07-06 GitHub_M
4.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain contributor access to Hugo project repository
  2. Delivery
    Inject alternate-encoded IP (hex/int/octal) into template data or partial
  3. Exploit
    Build triggered in cloud CI pipeline with cgo resolver active
  4. Execution
    resources.GetRemote submits URL, policy check fails to match non-decimal encoding
  5. Persist
    Cgo resolver normalizes encoding and issues request to cloud-metadata or internal endpoint
  6. Impact
    Sensitive 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 resources.GetRemote with a URL value that is data-derived or otherwise influenced by an attacker rather than a hardcoded string; (4) the attacker must have a mechanism to inject an alternate-encoded IP address into that URL argument, such as contributor access to data files, configuration, or content front matter. Exploitation is strictly limited to build time - no impact on the statically served site output or end-user browsers. Targets are restricted to services reachable from the build host: loopback services, RFC-1918 internal hosts, and the cloud-metadata endpoint. Sites where resources.GetRemote is only ever called with hardcoded, trusted URLs are not exploitable regardless of Hugo version or resolver configuration.

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 resources.GetRemote. The raw 4.6 score understates the potential business impact in cloud-hosted CI contexts: SC:H indicates that the subsequent system (the build host's cloud metadata service or internal network) faces high confidentiality impact, which in practice means IAM credentials or secrets manager tokens could be exfiltrated. Conversely, the score appropriately reflects that this is not a default-configuration mass-exploitation scenario - it requires both a specific resolver mode and attacker influence over template inputs. No EPSS data was provided in the intelligence feed. The vulnerability is not in CISA KEV and no POC has been identified, which lowers immediate response urgency. For teams running Hugo in cloud CI pipelines with any degree of contributor access to template data or data files, real-world risk is meaningfully higher than the 4.6 base score suggests.

Exploit ScenarioDerived

An attacker with write access to a Hugo project's data directory or a partial template contributes a URL argument to resources.GetRemote using the decimal-integer encoding of 169.254.169.254 (i.e., 2852039166). When the CI pipeline triggers a Hugo build on a cloud instance - such as GitHub Actions running on AWS - the policy check passes because the integer form is not matched by the deny rule, and the cgo resolver issues an HTTP GET to the cloud metadata endpoint, potentially returning IAM role credentials that are then embedded in the build output or logged. No public proof-of-concept has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

hugo v0.162.0, < v0.163.1

Affected Packages

go github.com/gohugoio/hugo fix: 0.163.1

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

Vendor (GitHub_M) PRIMARY 4.6 MEDIUM
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
vuln.today AI 6.3 MEDIUM

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
SUSE MEDIUM
Red Hat 6.8 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
widely used static site generator among developer and documentation teams
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

23
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +23
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

More in Hugo

View all
CVE-2020-26284 HIGH POC
8.5 Dec 21

Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem

CVE-2026-89259 CRITICAL
9.3 Sep 11

Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a

CVE-2026-75926 CRITICAL
9.3 Aug 18

Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose

CVE-2026-89258 CRITICAL
9.3 Sep 11

Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack

CVE-2026-100692 HIGH
8.7 Sep 26

Symlink-following flaws in Hugo's theme and module mount confinement allow files outside a project's mount roots to be r

CVE-2026-100690 HIGH
8.7 Sep 26

Arbitrary file read in Hugo v0.161.0 through v0.165.0 allows an attacker who can contribute content to a Hugo project -

CVE-2026-100693 HIGH
8.6 Sep 26

Case-sensitivity bypass in Hugo's security.http.urls IP-literal deny rule lets builds running v0.162.0 through v0.165.x

CVE-2026-10582 HIGH
8.3 Aug 24

Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s

CVE-2026-109596 MEDIUM
6.7 Oct 12

Local file disclosure in Hugo v0.162.0 through v0.166.x allows an attacker-controlled theme or module to place a symlink

CVE-2026-109595 MEDIUM
6.7 Oct 12

Path traversal in Hugo's asset pipeline lets a malicious theme or module bundle files from outside the project root into

CVE-2026-109574 MEDIUM
6.7 Oct 12

Path traversal in Hugo's css.Sass transpilation pipeline (all versions before v0.167.0) lets a malicious theme or module

CVE-2026-58403 MEDIUM
5.9 Jul 06

Symlink traversal in Hugo's virtual filesystem (v0.123.0-v0.163.0) allows a symlink planted inside a theme or local moun

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy