CVE-2023-2976: Guava Guava Vulnerable To Insecure Use Vulnerability

MODERATE
Advisory Identifier: GHSA-7g45-4rm6-3mm3
CVSS 5.5
CWE-379 CWE-552
Published
Advisory Summary

CVE-2023-2976 is a MODERATE (CVSS 5.5) guava vulnerable to insecure use vulnerability (CWE-379: Creation of Temporary File in Directory with Insecure Permissions) affecting Guava libraries in the Maven ecosystem. The issue involves guava vulnerable to insecure use of temporary directory. Remediation is available by upgrading affected packages to version 32.0.0-android.

CVE-2023-2976 at a Glance

CVE Identifier CVE-2023-2976
GHSA Identifier GHSA-7g45-4rm6-3mm3
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-379: Creation of Temporary File in Directory with Insecure Permissions
Affected Product Guava
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.5

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:N/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 None (I:N)
Availability None (A:N)

How to Fix CVE-2023-2976

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

com.google.guava:guava fixed: 32.0.0-android
<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>32.0.0-android</version>
</dependency>
Verify Direct and Transitive Dependencies

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

mvn dependency:tree -Dincludes=com.google.guava

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-2976, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.google.guava

Analyze the terminal output to locate any version of Guava in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 32.0.0-android), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.google.guava command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-379: Creation of Temporary File in Directory with Insecure Permissions, where the product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file. In Guava, 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

Use of Java's default temporary directory for file creation in `FileBackedOutputStream` in Google Guava versions 1.0 to 31.1 on Unix systems and Android Ice Cream Sandwich allows other users and apps on the machine with access to the default Java temporary directory to be able to access the files created by the class. Even though the security vulnerability is fixed in version 32.0.0, maintainers recommend using version 32.0.1 as version 32.0.0 breaks some functionality under Windows.

CVE-2023-2976 Affected Guava Versions

1 component(s)
Fixed Versions:
32.0.0-android
Product / Package Ecosystem Affected Versions Fixed Version
com.google.guava:guava
Maven
≥ 1.0
< 32.0.0-android
32.0.0-android

References

Frequently Asked Questions

What is CVE-2023-2976?
CVE-2023-2976 is a security vulnerability in Guava involving Guava vulnerable to insecure use of temporary directory under CWE-379: Creation of Temporary File in Directory with Insecure Permissions.
Which Guava versions are affected?
Affected versions include releases prior to 32.0.0-android across affected packages: com.google.guava:guava.
What version fixes CVE-2023-2976?
Upgrading to 32.0.0-android (or the latest patched release for your respective branch) resolves the vulnerability.
Is guava affected?
Yes, com.google.guava:guava is affected in releases prior to 32.0.0-android. Upgrade your dependency to 32.0.0-android or later.
What is the CVSS score of CVE-2023-2976?
CVE-2023-2976 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-2976?
CVE-2023-2976 is classified under CWE-379: Creation of Temporary File in Directory with Insecure Permissions (The product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file.).
How can I check Maven dependencies for CVE-2023-2976?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.google.guava'. 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-7g45-4rm6-3mm3",
  "modified" : "2025-11-04T16:44:26Z",
  "published" : "2023-06-14T18:30:38Z",
  "aliases" : [ "CVE-2023-2976" ],
  "summary" : "Guava vulnerable to insecure use of temporary directory",
  "details" : "Use of Java's default temporary directory for file creation in `FileBackedOutputStream` in Google Guava versions 1.0 to 31.1 on Unix systems and Android Ice Cream Sandwich allows other users and apps on the machine with access to the default Java temporary directory to be able to access the files created by the class.\n\nEven though the security vulnerability is fixed in version 32.0.0, maintainers recommend using version 32.0.1 as version 32.0.0 breaks some functionality under Windows.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.google.guava:guava"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0"
      }, {
        "fixed" : "32.0.0-android"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-2976"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/guava/issues/2575"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/guava/issues/6532"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/guava/commit/feb83a1c8fd2e7670b244d5afd23cba5aca43284"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/google/guava"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/guava/releases/tag/v32.0.0"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230818-0008"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20241108-0002"
  }, {
    "type" : "WEB",
    "url" : "https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-01006.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-379", "CWE-552" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-14T21:01:07Z",
    "nvd_published_at" : "2023-06-14T18:15:09Z"
  }
}