Hello gophers,
Version v1.2.4 of the
github.com/golang/glog module fixes a vulnerability when creating log files. 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 (a more detailed description of this vulnerability class and its mitigation options can be found at
https://owasp.org/www-community/vulnerabilities/Insecure_Temporary_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.
Thanks to Josh McSavaney and Günther Noack for reporting and contributing the fix for this issue.
This is CVE-2024-45339 and
https://github.com/golang/glog/pull/74.
Roland, on behalf of the Go team.