← News

Hugo: read arbitrary files

HighAI-generated2026-12-02

CVE
CVE-2026-140395
Severity
High (CVSS 7.5)
Attack conditions
Remotely, over the network · No account needed · No user action needed

Summary

Hugo versions from 0.56.0 up to but not including 0.170.0 have a path traversal flaw that lets malicious themes or modules read any file on the build host.

Details

According to the NVD record, Hugo releases starting at version 0.56.0 and earlier than 0.170.0 contain a path traversal vulnerability. The issue is triggered when a theme or module includes '..' segments in the import path of _vendor/modules.txt, allowing the attacker to treat any directory as a module root.

An attacker can exploit this to read arbitrary files on the system that builds the site, such as secret keys, credentials, or other sensitive data. The stolen information can then be exposed in the generated website.

What to do

The source record does not name a specific patch, fixed version or workaround. General measures:

  • Follow the vendor's security advisories.
  • Apply the update when it is released.
  • Limit access to the product as much as possible, especially from the internet.

Sources

Timeline

  • 1 December 2026 NVD record published
  • 2 December 2026 This article was written