Vulnerabilities in pkg:golang/github.com/golang/glog

PACKAGE
Advisory Identifier: GHSA-6wxm-mpqj-6jpf
Advisory Summary

CVE-2024-45339 is a MODERATE (CVSS 7.1) insecure temporary file usage vulnerability (CWE-377: Insecure Temporary File) affecting Github.com/golang/glog libraries in the Go ecosystem. The issue involves insecure temporary file usage in github.com/golang/glog. Remediation is available by upgrading affected packages to version 1.2.4.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/golang/glog

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/golang/glog. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6wxm-mpqj-6jpf CVE-2024-45339 MODERATE Insecure Temporary File usage in github.com/golang/glog

CVE-2024-45339 at a Glance

CVE Identifier CVE-2024-45339
GHSA Identifier GHSA-6wxm-mpqj-6jpf
Severity MODERATE
CVSS v3.1 Base Score 7.1
CWE Classification CWE-377: Insecure Temporary File
Affected Product Github.com/golang/glog
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-45339

To remediate this vulnerability, upgrade all affected Github.com/golang/glog dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/golang/glog fixed: 1.2.4
Upgrade github.com/golang/glog to 1.2.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/golang/glog

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-45339, inspect your project dependencies for Github.com/golang/glog:

inspect dependencies for github.com/golang/glog

Analyze the terminal output to locate any version of Github.com/golang/glog in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-377: Insecure Temporary File, where creating and using insecure temporary files can leave application and system data vulnerable to attack. In Github.com/golang/glog, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2024-45339 Affected Github.com/golang/glog Versions

1 component(s)
Fixed Versions:
1.2.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/golang/glog
Go
< 1.2.4
1.2.4

References

Frequently Asked Questions

What is CVE-2024-45339?
CVE-2024-45339 is a security vulnerability in Github.com/golang/glog involving Insecure Temporary File usage in github.com/golang/glog under CWE-377: Insecure Temporary File.
Which Github.com/golang/glog versions are affected?
Affected versions include releases prior to 1.2.4 across affected packages: github.com/golang/glog.
What version fixes CVE-2024-45339?
Upgrading to 1.2.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/golang/glog affected?
Yes, github.com/golang/glog is affected in releases prior to 1.2.4. Upgrade your dependency to 1.2.4 or later.
What is the CVSS score of CVE-2024-45339?
CVE-2024-45339 has a CVSS v3.1 base score of 7.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-45339?
CVE-2024-45339 is classified under CWE-377: Insecure Temporary File (Creating and using insecure temporary files can leave application and system data vulnerable to attack.).
How can I check Go dependencies for CVE-2024-45339?
Run the dependency tree command: 'inspect dependencies for github.com/golang/glog'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6wxm-mpqj-6jpf",
  "modified" : "2025-02-18T22:36:58Z",
  "published" : "2025-01-28T17:29:03Z",
  "aliases" : [ "CVE-2024-45339" ],
  "summary" : "Insecure Temporary File usage in github.com/golang/glog",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/golang/glog"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45339"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/golang/glog/pull/74"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/golang/glog/pull/74/commits/b8741656e406e66d6992bc2c9575e460ecaa0ec2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/golang/glog"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/golang-announce/c/H-Q4ouHWyKs"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/02/msg00019.html"
  }, {
    "type" : "WEB",
    "url" : "https://owasp.org/www-community/vulnerabilities/Insecure_Temporary_File"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3372"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-377", "CWE-61" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-28T17:29:03Z",
    "nvd_published_at" : "2025-01-28T02:15:28Z"
  }
}