# CVE-2021-28168: Local information disclosure via system temporary directory

> Local attackers can read sensitive data from temporary files created by Eclipse Jersey due to insecure file permissions.

- **Severity:** Medium 6.2 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Apr 2021
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-c43q-5hpj-4crv, OESA-2021-1181, OESA-2024-1036, OESA-2024-1037, OESA-2024-1038, OESA-2024-1039

## What is CVE-2021-28168?

CVE-2021-28168 is a medium-severity vulnerability in Oracle Communications Cloud Native Core Policy, published on 22 Apr 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Eclipse Jersey 2.28 to 2.33 and Eclipse Jersey 3.0.0 to 3.0.1 contains a local information disclosure vulnerability. This is due to the use of the File.createTempFile which creates a file inside of the system temporary directory with the permissions: -rw-r--r--. Thus the contents of this file are viewable by all other users locally on the system. As such, if the contents written is security sensitive, it can be disclosed to other local users.

Weakness: CWE-668 (Exposure of Resource to Wrong Sphere), CWE-379 (Creation of Temporary File in Directory with Insecure Permissions), CWE-378 (Creation of Temporary File With Insecure Permissions)

## Which versions are affected by CVE-2021-28168?

4 open source packages ship an affected version, including org.glassfish.jersey.core:jersey-common. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.glassfish.jersey.core:jersey-common` | Maven | From 2.28 | 2.34 |
| `org.glassfish.jersey.core:jersey-common` | Maven | From 2.28 | 2.34 |
| `org.glassfish.jersey.core:jersey-common` | Maven | From 3.0.0 | 3.0.2 |
| `org.glassfish.jersey.core:jersey-common` | Maven | From 3.0.0 | 3.0.2 |

Products: Eclipse Jersey, Oracle Communications Cloud Native Core Policy, Oracle Communications Cloud Native Core Unified Data Repository.

## How do I fix CVE-2021-28168?

Upgrade org.glassfish.jersey.core:jersey-common to a fixed version for your release line: 2.34 or 3.0.2.

## Is CVE-2021-28168 being exploited?

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

## Other vulnerabilities in Oracle Communications Cloud Native Core Policy

- [CVE-2025-12383](https://insights.sbomify.com/CVE-2025-12383/): Race Condition allows Bypass of Trust Restrictions (critical 9.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-28168 and fix it if it is affected.

What it is: CVE-2021-28168 is a medium-severity vulnerability in Oracle Communications Cloud Native Core Policy, published on 22 Apr 2021. 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-2021-28168 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.glassfish.jersey.core:jersey-common (Maven): affected from 2.28; fixed in 2.34
- org.glassfish.jersey.core:jersey-common (Maven): affected from 2.28; fixed in 2.34
- org.glassfish.jersey.core:jersey-common (Maven): affected from 3.0.0; fixed in 3.0.2
- org.glassfish.jersey.core:jersey-common (Maven): affected from 3.0.0; fixed in 3.0.2

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

## Sources

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

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