CVE-2026-10582
JSON

8.3high

Hugo 0.91.0 through 0.165.0 Server-Side Request Forgery via security.http.urls Lacking Destination Address Validation

Severity
8.3high CVSS:4.0 by VulnCheck
Exploit likelihood
0.32% (higher than 26% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
VulnCheck

Description

Hugo's security.http.urls allowlist is the only control on outbound fetches made by resources.GetRemote, and it inspects the URL text alone. CheckAllowedHTTPURL in config/security/securityConfig.go applies the configured pattern list and then re-checks a canonicalised form of an integer, hex or octal IPv4 host, but it never resolves the hostname and never inspects the address the HTTP client actually connects to. The client constructed in resources/resource_factories/create/create.go installs no dial-time hook, so no check occurs at connection time either. A hostname that resolves to a loopback, private or cloud-metadata address therefore satisfies the policy, and the response body is embedded in the generated site. An attacker who can supply a URL through content, for example a front-matter field or a CMS field, can make the build fetch an internal endpoint and publish the response in the static output, so the build artifact itself carries the data out.

Affected

Product or packageVersionsReported by
gohugoio hugofrom 0.91.0 up to 0.165.0CVE List

All scores

VulnCheck8.3high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
VulnCheck7.4high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Classification

CWE-918

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Hugo's security.http.urls allowlist is the only control on outbound fetches made by resources.GetRemote, and it inspects the URL text alone. CheckAllowedHTTPURL in config/security/securityConfig.go applies the configured pattern list and then re-checks a canonicalised form of an integer, hex or octal IPv4 host, but it never resolves the hostname and never inspects the address the HTTP client actually connects to. The client constructed in resources/resource_factories/create/create.go installs no dial-time hook, so no check occurs at connection time either. A hostname that resolves to a loopback, private or cloud-metadata address therefore satisfies the policy, and the response body is embedded in the generated site. An attacker who can supply a URL through content, for example a front-matter field or a CMS field, can make the build fetch an internal endpoint and publish the response in the static output, so the build artifact itself carries the data out.

NVD (es)

La lista de permitidos 'security.http.urls' de Hugo es el único control sobre las recuperaciones salientes realizadas por 'resources.GetRemote', y solo inspecciona el texto de la URL. 'CheckAllowedHTTPURL' en 'config/security/securityConfig.go' aplica la lista de patrones configurada y luego vuelve a verificar una forma canonizada de un host IPv4 entero, hexadecimal u octal, pero nunca resuelve el nombre de host y nunca inspecciona la dirección a la que el 'cliente HTTP' realmente se conecta. El 'cliente' construido en 'resources/resource_factories/create/create.go' no instala ningún 'hook' en tiempo de conexión, por lo que tampoco se realiza ninguna verificación en el momento de la conexión. Un nombre de host que se resuelve en una dirección de 'loopback', privada o de metadatos de la nube, por lo tanto, satisface la política, y el cuerpo de la respuesta se incrusta en el sitio generado. Un 'atacante' que puede proporcionar una URL a través del contenido, por ejemplo, un campo de 'front-matter' o un campo de 'CMS', puede hacer que la compilación recupere un 'endpoint' interno y publique la respuesta en la salida estática, por lo que el artefacto de compilación en sí mismo extrae los datos.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-10582 changed 2026-08-24CVE Terms of Use
NVDCVE-2026-10582 changed 2026-10-12Public domain