p PatchFirst

CVE-2026-140395

CVE-2026-140395 · Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt

CVSS 8.7 · High · EPSS 0.8% · Fix available

Compare with your installed version

Affected products and known fixed versions are public information. Compare them with your installed version.

  • hugoUpdate to 0.170.0
  • hugo Ubuntu 16.04 LTSNo fix published
  • hugo Ubuntu 18.04 LTSNo fix published
  • hugo Ubuntu 20.04 LTSNo fix published
  • and 4 more

Check the installed version:

dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="hugo"'

Assess your server’s risks

The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.

Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.

curl -fsSL https://patchfirst.dev/check.sh | sh
Check your server for free →

Channels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.

This page contains facts from public vulnerability sources. Check the original advisory before updating.

Hugo from 0.56.0 before 0.170.0 contains a path traversal vulnerability that allows malicious themes or modules to read arbitrary build host files by supplying '..' segments in _vendor/modules.txt import paths. Attackers can make Hugo treat any directory as a module root and use readFile or static mounts to publish secrets, credentials, and system files in the generated site.

Published
Updated

Fixes in distributions

Stack: system

Affected products and versions

  • hugo

    Versions
    • ≥ 0.56.0, < 0.170.0: Affected (semver)
    • 0.170.0: Not affected (semver)

    Update to 0.170.0

  • hugo Ubuntu 16.04 LTS

    Versions
    • 0.15+git20160109.147.dd1d655-1
    • 0.15+git20160109.147.dd1d655-2
    • 0.15+git20160128.179.5def6d9-1
    • 0.15+git20160206.203.ed23711-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • hugo Ubuntu 18.04 LTS

    Versions
    • 0.25.1-2
    • 0.26-1
    • 0.35-1
    • 0.37.1-1
    • 0.38-1
    • 0.39-1
    All versions (8)
    • 0.40-1
    • 0.40.1-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • hugo Ubuntu 20.04 LTS

    Versions
    • 0.57.2-1
    • 0.58.3-1
    • 0.59.1-1.1
    • 0.68.3-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • hugo Ubuntu 22.04 LTS

    Versions
    • 0.80.0-6
    • 0.89.4-2
    • 0.90.0-1
    • 0.90.1-1
    • 0.91.0-1
    • 0.91.2-1
    All versions (10)
    • 0.92.0-1
    • 0.92.1-1build1
    • 0.92.2-1
    • 0.92.2-1ubuntu0.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • hugo Ubuntu Pro 24.04 LTS

    Versions
    • 0.113.0-3
    • 0.119.0-2
    • 0.120.3-1
    • 0.120.4-1
    • 0.121.2-1
    • 0.122.0-1
    All versions (13)
    • 0.123.7-1build1
    • 0.123.7-1ubuntu0.1
    • 0.123.7-1ubuntu0.2
    • 0.123.7-1ubuntu0.2+esm1
    • 0.123.7-1ubuntu0.3
    • 0.123.7-1ubuntu0.3+esm1
    • 0.123.7-1ubuntu0.3+esm2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • hugo Ubuntu 26.10

    Versions
    • 0.154.5-1
    • 0.162.1-5
    • 0.162.1-7
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • hugo Ubuntu 26.04 LTS

    Versions
    • 0.131.0-1
    • 0.152.2-1
    • 0.153.1-3
    • 0.153.2-1
    • 0.154.2-2
    • 0.154.3-1
    All versions (7)
    • 0.154.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →