# CVE-2023-2976: Use of temporary directory for file creation in `FileBackedOutputStream` in Guava

> Local attackers can read sensitive files created by Guava's FileBackedOutputStream due to insecure temporary directory usage.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/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:** 14 Jun 2023
- **Updated:** 25 Feb 2026
- **Also known as:** AZL-27173, AZL-43696, CLEANSTART-2026-BX78459, CLEANSTART-2026-CK79983, CLEANSTART-2026-NL20798, CLEANSTART-2026-SF12674, CLSA-2026-1774398096, CLSA-2026-1774484488, CLSA-2026-1778633133, CLSA-2026-1790132153, CLSA-2026-1792656622, CLSA-2026-1792656687, CLSA-2026-1792656983, DEBIAN-CVE-2023-2976, ECHO-173b-7b42-d706, GHSA-7g45-4rm6-3mm3, MINI-6rv8-g76c-wg92, MINI-6xh8-r393-jqxf, MINI-8q8h-cv22-xc5g, MINI-ch24-3397-56m3, MINI-fxg8-c6pc-5pfv, MINI-qc53-8j79-53r8, MINI-qphm-cjw7-86wh, MINI-qv5m-vvrw-jwf9, MINI-v7mg-4867-pv2x, MINI-w2f5-wj66-q4vj, MINI-x969-pr7h-fcq3, OESA-2023-1411, OESA-2023-1412, ROOT-APP-MAVEN-CVE-2023-2976, UBUNTU-CVE-2023-2976, openSUSE-SU-2024:13001-1

## What is CVE-2023-2976?

CVE-2023-2976 is a medium-severity vulnerability in Google Guava, published on 14 Jun 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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, we recommend using version 32.0.1 as version 32.0.0 breaks some functionality under Windows.

Weakness: CWE-552 (Files or Directories Accessible to External Parties)

## Which versions are affected by CVE-2023-2976?

2 open source packages ship an affected version, including com.google.guava:guava. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.google.guava:guava` | Maven | From 1.0 | 32.0.0-android |
| `com.google.guava:guava` | Maven | From 1.0 | 32.0.0-android |
| `guava` | openSUSE:Tumbleweed | All versions | 32.0.1-1.1 |

Products: Google Guava.

## How do I fix CVE-2023-2976?

Upgrade com.google.guava:guava to 32.0.0-android or later.

## Is CVE-2023-2976 being exploited?

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

## Other vulnerabilities in Google Guava

- [CVE-2018-10237](https://insights.sbomify.com/CVE-2018-10237/): Denial of Service in Google Guava (medium 5.9)
- [CVE-2020-8908](https://insights.sbomify.com/CVE-2020-8908/): Temp directory permission issue in Guava (low 3.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-2976 and fix it if it is affected.

What it is: CVE-2023-2976 is a medium-severity vulnerability in Google Guava, published on 14 Jun 2023. 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-2023-2976 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.google.guava:guava (Maven): affected from 1.0; fixed in 32.0.0-android
- com.google.guava:guava (Maven): affected from 1.0; fixed in 32.0.0-android

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-2023-2976/ (Markdown: https://insights.sbomify.com/CVE-2023-2976/index.md)
```

## Sources

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

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