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

> An attacker can overwrite sensitive files by planting symbolic links in the default log directory, affecting applications using the glog library.

- **Severity:** High 7.1 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Jan 2025
- **Updated:** 30 Apr 2026
- **Also known as:** AZL-56066, AZL-56069, AZL-56075, AZL-56078, AZL-56379, AZL-56402, CLEANSTART-2026-CJ41565, CLEANSTART-2026-DK08962, CLEANSTART-2026-DK20803, CLEANSTART-2026-HI24388, DEBIAN-CVE-2024-45339, DLA-4056-1, GHSA-6wxm-mpqj-6jpf, GO-2025-3372, MINI-2r3p-fmfq-xvxh, MINI-c6q2-wc52-hxqw, MINI-m9x6-fx63-c7xv, MINI-rf5g-r7w9-rj8r, MINI-w749-j6q2-cjp8, SUSE-SU-2025:02149-1, SUSE-SU-2025:02150-1, SUSE-SU-2025:0580-1, SUSE-SU-2025:0611-1, SUSE-SU-2025:20746-1, UBUNTU-CVE-2024-45339, openSUSE-SU-2025:14815-1

## What is CVE-2024-45339?

CVE-2024-45339 is a high-severity path traversal vulnerability in github.com/golang/glog, published on 28 Jan 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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

## Which versions are affected by CVE-2024-45339?

3 open source packages ship an affected version, including github.com/golang/glog.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/golang/glog` | Go | All versions | 1.2.4 |
| `github.com/golang/glog` | Go | All versions | 1.2.4 |
| `github.com/golang/glog` | Go | All versions | 1.2.4 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Micro 5.5 | All versions | 20250115.01-150000.1.44.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Micro 5.5 | All versions | 20250416.02-150000.1.50.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 20250115.01-1.35.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 20250416.02-1.41.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 20250115.01-150000.1.44.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 20250416.02-150000.1.50.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 20250115.01-150000.1.44.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 20250416.02-150000.1.50.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 20250115.01-150000.1.44.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 20250416.02-150000.1.50.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 20250115.01-150000.1.44.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 20250416.02-150000.1.50.1 |
| `google-osconfig-agent` | SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | All versions | 20250416.02-150000.1.50.1 |
| `google-osconfig-agent` | SUSE:Linux Micro 6.1 | All versions | 20250416.02-slfo.1.1_1.1 |
| `google-osconfig-agent` | openSUSE:Leap 15.6 | All versions | 20250115.01-150000.1.44.1 |
| `google-osconfig-agent` | openSUSE:Leap 15.6 | All versions | 20250416.02-150000.1.50.1 |
| `google-osconfig-agent` | openSUSE:Tumbleweed | All versions | 20250115.01-2.1 |

## How do I fix CVE-2024-45339?

Upgrade github.com/golang/glog to 1.2.4 or later.

## Is CVE-2024-45339 being exploited?

There is no known exploitation of CVE-2024-45339 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-45339 and fix it if it is affected.

What it is: CVE-2024-45339 is a high-severity path traversal vulnerability in github.com/golang/glog, published on 28 Jan 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-45339 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/golang/glog (Go): affected all versions; fixed in 1.2.4
- github.com/golang/glog (Go): affected all versions; fixed in 1.2.4
- github.com/golang/glog (Go): affected all versions; fixed in 1.2.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-45339/ (Markdown: https://insights.sbomify.com/CVE-2024-45339/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-45339
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-45339
- OSV: https://osv.dev/vulnerability/CVE-2024-45339

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-45339/
Summaries are generated and may contain mistakes; the official description above is the record.
