Symlink Attack Affecting std/os package, versions <1.23.10>=1.24.0-0 <1.24.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.26% (18th 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-STDOS-14548505
  • published6 Jan 2026
  • disclosed11 Jun 2025
  • creditJunyoung Park, Dong-uk Kim

Introduced: 11 Jun 2025

CVE-2025-0913  (opens in a new tab)
CWE-59  (opens in a new tab)

How to fix?

Upgrade std/os to version 1.23.10, 1.24.4 or higher.

Overview

std/os is a Go standard library package std/os

Affected versions of this package are vulnerable to Symlink Attack.

Go Vulnerability Report:
os.OpenFile(path, os.O_CREATE|O_EXCL) behaved differently on Unix and Windows systems when the target path was a dangling symlink. On Unix systems, OpenFile with O_CREATE and O_EXCL flags never follows symlinks. On Windows, when the target path was a symlink to a nonexistent location, OpenFile would create a file in that location. OpenFile now always returns an error when the O_CREATE and O_EXCL flags are both set and the target path is a symlink.

CVSS Base Scores

version 4.0
version 3.1