CVE-2020-8908: Temp directory permission issue in Guava
A flaw was found in Guava that creates temporary directories with default permissions similar to /tmp. This issue may allow local users access, possibly permitting information exposure.
Other sources
A temp directory creation vulnerability exist in Guava versions prior to 30.0 allowing an attacker with access to the machine to potentially access data in a temporary directory created by the Guava com.google.common.io.Files.createTempDir(). The permissions granted to the directory created default to the standard unix-like /tmp ones, leaving the files open. We recommend updating Guava to version 30.0 or later, or update to Java 7 or later, or to explicitly change the permissions after the creation of the directory if neither are possible.
Reference: https://github.com/google/guava/issues/4011
Upstream patch: https://github.com/google/guava/commit/fec0dbc4634006a6162cfd4d0d09c962073ddf40
— Red Hat
A temp directory creation vulnerability exists in all versions of Guava, allowing an attacker with access to the machine to potentially access data in a temporary directory created by the Guava API com.google.common.io.Files.createTempDir(). By default, on unix-like systems, the created directory is world-readable (readable by an attacker with access to the system). The method in question has been marked @Deprecated in versions 30.0 and later and should not be used. For Android developers, we recommend choosing a temporary directory API provided by Android, such as context.getCacheDir(). For other Java developers, we recommend migrating to the Java 7 API java.nio.file.Files.createTempDirectory() which explicitly configures permissions of 700, or configuring the Java runtime's java.io.tmpdir system property to point to a location whose permissions are appropriately configured.
A temp directory creation vulnerability exists in Guava prior to version 32.0.0 allowing an attacker with access to the machine to potentially access data in a temporary directory created by the Guava com.google.common.io.Files.createTempDir(). The permissions granted to the directory created default to the standard unix-like /tmp ones, leaving the files open. Maintainers recommend explicitly changing the permissions after the creation of the directory, or removing uses of the vulnerable method.
Apache HttpComponents Client could allow a remote attacker to traverse directories on the system, caused by improper validation of user requests. An attacker could send a specially-crafted URL request containing "dot dot" sequences (/../) to view files on the system.
— IBM
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/eap7-activemq-artemisto a version that resolves this vulnerability.Fixed in 0:2.9.0-9.redhat_00019.1.el6ea - Upgrade
Upgrade
redhat/eap7-bouncycastleto a version that resolves this vulnerability.Fixed in 0:1.68.0-1.redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-guava-failureaccessto a version that resolves this vulnerability.Fixed in 0:1.0.1-1.redhat_00002.1.el6ea - Upgrade
Upgrade
redhat/eap7-guava-librariesto a version that resolves this vulnerability.Fixed in 0:30.1.0-1.redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-hal-consoleto a version that resolves this vulnerability.Fixed in 0:3.2.13-1.Final_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-ironjacamarto a version that resolves this vulnerability.Fixed in 0:1.4.27-1.Final_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-jboss-ejb-clientto a version that resolves this vulnerability.Fixed in 0:4.0.39-1.SP1_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-jboss-logmanagerto a version that resolves this vulnerability.Fixed in 0:2.1.18-1.Final_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-jboss-remotingto a version that resolves this vulnerability.Fixed in 0:5.0.20-2.SP1_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-jboss-server-migrationto a version that resolves this vulnerability.Fixed in 0:1.7.2-5.Final_redhat_00006.1.el6ea - Upgrade
Upgrade
redhat/eap7-narayanato a version that resolves this vulnerability.Fixed in 0:5.9.11-1.Final_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-undertowto a version that resolves this vulnerability.Fixed in 0:2.0.34-1.SP1_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-wildflyto a version that resolves this vulnerability.Fixed in 0:7.3.6-1.GA_redhat_00002.1.el6ea - Upgrade
Upgrade
redhat/eap7-wildfly-elytronto a version that resolves this vulnerability.Fixed in 0:1.10.11-1.Final_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-wildfly-http-clientto a version that resolves this vulnerability.Fixed in 0:1.0.25-1.Final_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-wildfly-naming-clientto a version that resolves this vulnerability.Fixed in 0:1.0.14-1.Final_redhat_00001.1.el6ea - Upgrade
Upgrade
redhat/eap7-activemq-artemisto a version that resolves this vulnerability.Fixed in 0:2.9.0-9.redhat_00019.1.el7ea - Upgrade
Upgrade
redhat/eap7-bouncycastleto a version that resolves this vulnerability.Fixed in 0:1.68.0-1.redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-guava-failureaccessto a version that resolves this vulnerability.Fixed in 0:1.0.1-1.redhat_00002.1.el7ea - Upgrade
Upgrade
redhat/eap7-guava-librariesto a version that resolves this vulnerability.Fixed in 0:30.1.0-1.redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-hal-consoleto a version that resolves this vulnerability.Fixed in 0:3.2.13-1.Final_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-ironjacamarto a version that resolves this vulnerability.Fixed in 0:1.4.27-1.Final_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-jboss-ejb-clientto a version that resolves this vulnerability.Fixed in 0:4.0.39-1.SP1_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-jboss-logmanagerto a version that resolves this vulnerability.Fixed in 0:2.1.18-1.Final_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-jboss-remotingto a version that resolves this vulnerability.Fixed in 0:5.0.20-2.SP1_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-jboss-server-migrationto a version that resolves this vulnerability.Fixed in 0:1.7.2-5.Final_redhat_00006.1.el7ea - Upgrade
Upgrade
redhat/eap7-narayanato a version that resolves this vulnerability.Fixed in 0:5.9.11-1.Final_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-undertowto a version that resolves this vulnerability.Fixed in 0:2.0.34-1.SP1_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-wildflyto a version that resolves this vulnerability.Fixed in 0:7.3.6-1.GA_redhat_00002.1.el7ea - Upgrade
Upgrade
redhat/eap7-wildfly-elytronto a version that resolves this vulnerability.Fixed in 0:1.10.11-1.Final_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-wildfly-http-clientto a version that resolves this vulnerability.Fixed in 0:1.0.25-1.Final_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-wildfly-naming-clientto a version that resolves this vulnerability.Fixed in 0:1.0.14-1.Final_redhat_00001.1.el7ea - Upgrade
Upgrade
redhat/eap7-activemq-artemisto a version that resolves this vulnerability.Fixed in 0:2.9.0-9.redhat_00019.1.el8ea - Upgrade
Upgrade
redhat/eap7-bouncycastleto a version that resolves this vulnerability.Fixed in 0:1.68.0-1.redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-guava-failureaccessto a version that resolves this vulnerability.Fixed in 0:1.0.1-1.redhat_00002.1.el8ea - Upgrade
Upgrade
redhat/eap7-guava-librariesto a version that resolves this vulnerability.Fixed in 0:30.1.0-1.redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-hal-consoleto a version that resolves this vulnerability.Fixed in 0:3.2.13-1.Final_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-ironjacamarto a version that resolves this vulnerability.Fixed in 0:1.4.27-1.Final_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-jboss-ejb-clientto a version that resolves this vulnerability.Fixed in 0:4.0.39-1.SP1_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-jboss-logmanagerto a version that resolves this vulnerability.Fixed in 0:2.1.18-1.Final_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-jboss-remotingto a version that resolves this vulnerability.Fixed in 0:5.0.20-2.SP1_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-jboss-server-migrationto a version that resolves this vulnerability.Fixed in 0:1.7.2-5.Final_redhat_00006.1.el8ea - Upgrade
Upgrade
redhat/eap7-narayanato a version that resolves this vulnerability.Fixed in 0:5.9.11-1.Final_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-undertowto a version that resolves this vulnerability.Fixed in 0:2.0.34-1.SP1_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-wildflyto a version that resolves this vulnerability.Fixed in 0:7.3.6-1.GA_redhat_00002.1.el8ea - Upgrade
Upgrade
redhat/eap7-wildfly-elytronto a version that resolves this vulnerability.Fixed in 0:1.10.11-1.Final_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-wildfly-http-clientto a version that resolves this vulnerability.Fixed in 0:1.0.25-1.Final_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/eap7-wildfly-naming-clientto a version that resolves this vulnerability.Fixed in 0:1.0.14-1.Final_redhat_00001.1.el8ea - Upgrade
Upgrade
redhat/candlepinto a version that resolves this vulnerability.Fixed in 0:4.0.9-1.el7 - Upgrade
Upgrade
maven/com.google.guava:guavato a version that resolves this vulnerability.Fixed in 32.0.0-android - Upgrade
Upgrade
redhat/guavato a version that resolves this vulnerability.Fixed in 30.0 - Upgrade
Upgrade
google/guavato a version that resolves this vulnerability.Fixed in 30.0 - Upgrade
Upgrade
google/guavato a version that resolves this vulnerability.Fixed in 32.0.0 - Configuration
Stop using Guava com.google.common.io.Files.createTempDir() (deprecated in 30.0+) and migrate to the Java 7 API java.nio.file.Files.createTempDirectory() or configure directory permissions explicitly after creation.
Guava com.google.common.io.Files.createTempDir() Use of deprecated temp directory API = Do not use (method marked @Deprecated in 30.0 and later) - Configuration
Configure the Java runtime system property java.io.tmpdir to a temp directory path with appropriately configured permissions (instead of default /tmp world-readable permissions).
Java runtime java.io.tmpdir = Point to a location whose permissions are appropriately configured - Configuration
After creating the temporary directory, explicitly change its permissions so it is not world-readable; alternatively remove uses of the vulnerable method.
Guava com.google.common.io.Files.createTempDir() Temporary directory permissions = Explicitly change after creation - Compensating control
For Android, use an Android-provided temporary directory API such as context.getCacheDir() instead of Guava's createTempDir().
- Compensating control
For remote traversal risk mentioned (Apache HttpComponents Client), ensure proper validation of user requests is in place to prevent directory traversal (e.g., reject dot-dot sequences /../ used in crafted URL requests).
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2020-8908?
CVE-2020-8908 has been assigned a medium severity level due to its potential for information exposure.
How do I fix CVE-2020-8908?
To fix CVE-2020-8908, upgrade to Guava version 30.0 or later.
What versions of Guava are affected by CVE-2020-8908?
CVE-2020-8908 affects Guava versions prior to 30.0.
What type of vulnerability is CVE-2020-8908?
CVE-2020-8908 is a temporary directory creation vulnerability that may allow local users to access sensitive information.
Which software packages are affected by CVE-2020-8908?
Several Red Hat packages including eap7-activemq-artemis and eap7-bouncycastle are affected by CVE-2020-8908.