Intel

AIKIDO-2026-132952

github.com/gohugoio/hugo is vulnerable to Improper Link Resolution Before File Access ('Link Following')

CVE-2026-109596Published Oct 30, 2026
October 30, 2026

50

CVE Score

Medium

Improper Link Resolution Before File Access ('Link Following')

Are you affected? Scan for Free

TL;DR

Hugo's hugofs.RootMappingFs.collectDirEntries() enumerates intermediate "virtual ancestor" directories of a nested module/theme mount by calling JoinStat() on the parent mount and, when successful, directly invoking collectDir() without applying the symlink-confinement check that the sibling direct-file-access path (statRoot) already enforced starting at v0.162.0. A theme or module mounted by the site build supplies the ancestor directory path; if that ancestor is a symlink or NTFS junction pointing outside the module root, its target directory's files are listed and their contents become readable and can be published via resources.Match and similar resource functions during the build. The fix adds a call to isSymlinkOrHasSymlinkParent(rfs.Fs, rm.To, fi.Meta().Filename) before collecting the ancestor directory, skipping it (via continue) when it is a symlink or has a symlinked parent, mirroring the existing confinement rule used for direct file access.

How do I fix this?

Upgrade the github.com/gohugoio/hugo package to version 0.167.0 or later.

Who does this affect?

You are affected if you use a Hugo version in the vulnerable range and build a site with nested module or theme mounts where a symlink or junction at an intermediate mount ancestor points outside the mount root.

Versions

0.162.0 - 0.166.0

Fixed in 0.167.0

Background info

github.com/gohugoio/hugo is vulnerable to Improper Link Resolution Before File Access ('Link Following') in versions 0.162.0 - 0.166.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea