Medium, CVSS 6.2MavenPublished
Local information disclosure via system temporary directory
CVE-2021-28168 · GHSA-c43q-5hpj-4crv
- Affected
- Maven org.glassfish.jersey.core:jersey-common >= 2.28, <= 2.33; >= 3.0.0, <= 3.0.1
- Fixed in
- 3.0.22.34· Vendor fix available
- Issue
- Impact Eclipse Jersey 2.28 - 2.33 and Eclipse Jersey 3.0.0 - 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. Workaround This issue can be mitigated by manually setting the java.io.tmpdir system property when launching the JVM. Patches Jersey 2.34 and 3.0.2 forward sets the correct permissions on the temporary file created by Jersey. References - https://github.com/eclipse-ee4j/jersey/pull/4712 - CWE-378: Creation of Temporary File With Insecure Permissions - CWE-379: Creation of Temporary File in Directory with Insecure Permissions Similar Vulnerabilities Similar, but not the same: - JUnit 4 -…
Recommended action: Upgrade to 3.0.2 or 2.34 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.