golang/glog · Security
Insecure Temporary File usage in github.com/golang/glog
- GHSA ID
- GHSA-6wxm-mpqj-6jpf
- CVE ID
- CVE-2024-45339
- Severity
- medium
- Published
- Updated
- CVSS
- 7.1 · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- CVSS v3
- 7.1 · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- CVSS v4
- 4.1 · CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U
Description
When logs are written to a widely-writable directory (the default), an unprivileged attacker may predict a privileged process's log file path and pre-create a symbolic link to a sensitive file in its place. When that privileged process runs, it will follow the planted symlink and overwrite that sensitive file. To fix that, glog now causes the program to exit (with status code 2) when it finds that the configured log file already exists.
CWEs
- CWE-61 · UNIX Symbolic Link (Symlink) Following
- CWE-377 · Insecure Temporary File
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-45339 ↗
- https://github.com/golang/glog/pull/74 ↗
- https://github.com/golang/glog/pull/74/commits/b8741656e406e66d6992bc2c9575e460ecaa0ec2 ↗
- https://groups.google.com/g/golang-announce/c/H-Q4ouHWyKs ↗
- https://owasp.org/www-community/vulnerabilities/Insecure_Temporary_File ↗
- https://pkg.go.dev/vuln/GO-2025-3372 ↗
- https://lists.debian.org/debian-lts-announce/2025/02/msg00019.html ↗
- https://github.com/advisories/GHSA-6wxm-mpqj-6jpf ↗