<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Hugo - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/hugo/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 19 Jun 2026 19:22:40 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/hugo/feed.xml" rel="self" type="application/rss+xml"/><item><title>Hugo security.http.urls Bypass via Alternate IPv4 Encodings (SSRF)</title><link>https://feed.craftedsignal.io/briefs/2026-06-hugo-ssrf-bypass/</link><pubDate>Fri, 19 Jun 2026 19:22:40 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-hugo-ssrf-bypass/</guid><description>A Server-Side Request Forgery (SSRF) vulnerability exists in Hugo versions 0.162.0 through 0.163.0, where the 'security.http.urls' policy designed to deny requests to loopback, internal, and cloud-metadata IPv4 literals could be bypassed as the policy only matched dotted-decimal notation, allowing alternate IPv4 encodings (integer, hex, octal) to pass, enabling build-time server-side requests to internal services and cloud-metadata endpoints when untrusted or data-derived URLs are passed to 'resources.GetRemote'.</description><content:encoded><![CDATA[<p>A significant Server-Side Request Forgery (SSRF) vulnerability, impacting Hugo versions 0.162.0 through 0.163.0, allows attackers to bypass the <code>security.http.urls</code> policy. This policy is intended to prevent Hugo from making requests to sensitive internal, loopback, or cloud-metadata IPv4 addresses during site generation, especially when processing untrusted URLs via <code>resources.GetRemote</code>. The bypass occurs because the denial rule only recognized IPv4 addresses in standard dotted-decimal format, failing to catch alternate encodings such as integer, hexadecimal, or octal representations. This flaw can lead to build-time server-side requests to internal infrastructure or cloud metadata endpoints when a host platform utilizes the <code>cgo</code> system resolver, enabling potential information disclosure or unauthorized internal network access during CI/CD processes or other build environments. The vulnerability was patched in Hugo v0.163.1, which canonicalizes IPv4 hosts to dotted-decimal before applying the policy.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Initial Access / Injection</strong>: An attacker injects a specially crafted URL containing an alternate IPv4 encoding (e.g., <code>http://2130706433/</code> for <code>127.0.0.1</code> or <code>http://2852039166/</code> for cloud metadata) into a Hugo template or data source.</li>
<li><strong>Vulnerable Processing</strong>: During a Hugo site build, a template attempts to fetch content from this untrusted URL using the <code>resources.GetRemote</code> function.</li>
<li><strong>Policy Bypass Attempt</strong>: Hugo's <code>security.http.urls</code> policy is consulted to determine if the URL should be denied, but it only checks for dotted-decimal IPv4 formats.</li>
<li><strong>Encoding Misinterpretation</strong>: Due to the vulnerability, the policy fails to recognize the integer, hexadecimal, or octal IPv4 encoding as a disallowed internal, loopback, or cloud-metadata address.</li>
<li><strong>DNS/Resolver Resolution</strong>: The host platform's <code>cgo</code> system resolver resolves the alternate IPv4 encoding (e.g., <code>2130706433</code>) to its standard dotted-decimal equivalent (<code>127.0.0.1</code>).</li>
<li><strong>Internal Request Execution</strong>: Hugo proceeds to make an outbound HTTP GET request to the now-resolved internal IP address (e.g., <code>127.0.0.1</code>, <code>169.254.169.254</code>, or another internal service).</li>
<li><strong>Information Disclosure/Internal Access</strong>: The build environment's internal services or cloud metadata endpoint respond to Hugo's request, potentially disclosing sensitive configuration data, credentials, or allowing access to internal resources that should have been protected.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The primary impact of this vulnerability is the potential for Server-Side Request Forgery (SSRF) during the Hugo site build process. If exploited, an attacker can coerce the build server to make outbound HTTP requests to arbitrary internal network resources, including loopback addresses, internal hosts, or cloud metadata endpoints (e.g., <code>169.254.169.254</code>). This can lead to the exposure of sensitive information such as cloud instance credentials, internal network topology, or other confidential data accessible from the build environment. While no specific victim counts or sectors were noted, organizations using Hugo in CI/CD pipelines or environments where untrusted content influences builds are at risk of unauthorized data access and potential lateral movement within their internal infrastructure.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Hugo to version <strong>v0.163.1</strong> or newer immediately to apply the patch that correctly canonicalizes IPv4 addresses.</li>
<li>Review CI/CD pipeline configurations and Hugo site templates to avoid passing untrusted or data-derived URLs directly to <code>resources.GetRemote</code>.</li>
<li>Harden <code>security.http.urls</code> in Hugo configurations to implement an explicit allow-list of trusted hosts for <code>resources.GetRemote</code> calls.</li>
<li>Deploy the provided Sigma rules to detect unexpected outbound network connections from build servers and similar environments.</li>
<li>Ensure network connection logging is enabled on build servers and developer workstations to capture attempts to access internal or cloud metadata IPs.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssrf</category><category>vulnerability</category><category>hugo</category><category>build-time</category><category>webserver</category></item></channel></rss>