Symlink Attack Affecting github.com/golang/glog package, versions <1.2.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (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-GITHUBCOMGOLANGGLOG-8663465
  • published28 Jan 2025
  • disclosed28 Jan 2025
  • creditJosh McSavaney, Günther Noack

Introduced: 28 Jan 2025

NewCVE-2024-45339  (opens in a new tab)
CWE-59  (opens in a new tab)

How to fix?

Upgrade github.com/golang/glog to version 1.2.4 or higher.

Overview

Affected versions of this package are vulnerable to Symlink Attack when logs are written to a default directory that is widely writable. An unprivileged attacker can overwrite sensitive files by predicting a privileged process's log file path and pre-creating a symbolic link to this file, which the logging process will then follow and overwrite.

Note: This is only exploitable if the attacker has access to the filesystem of the target machine and has permissions to create files (or symlinks) in the writable directory.

CVSS Scores

version 4.0
version 3.1