Symlink Attack Affecting github.com/gohugoio/hugo/tpl/os package, versions >=0.123.0 <0.163.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.48% (39th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMGOHUGOIOHUGOTPLOS-17394004
  • published22 Jun 2026
  • disclosed19 Jun 2026
  • creditUnknown

Introduced: 19 Jun 2026

CVE-2026-58403  (opens in a new tab)
CWE-59  (opens in a new tab)

How to fix?

Upgrade github.com/gohugoio/hugo/tpl/os to version 0.163.1 or higher.

Overview

Affected versions of this package are vulnerable to Symlink Attack via the os.ReadFile() function during direct lookups via resources.Get. An attacker can access arbitrary files outside the intended directory by placing a symlink inside a mounted directory that points to files outside the mount, thereby bypassing directory confinement.

CVSS Base Scores

version 4.0
version 3.1