Vulnerabilities

11 via 25 paths

Dependencies

51

Source

GitHub

Commit

efa2efd0

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 11
  • 2
Severity
  • 3
  • 7
  • 3
Status
  • 13
  • 0
  • 0

high severity

Uncontrolled Recursion

  • Vulnerable module: org.apache.commons:commons-lang3
  • Introduced through: org.apache.maven:maven-core@3.8.5

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.commons:commons-lang3@3.8.1
    Remediation: Upgrade to org.apache.maven:maven-core@3.9.8.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven.resolver:maven-resolver-impl@1.6.3 org.apache.commons:commons-lang3@3.8.1
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-artifact@3.8.5 org.apache.commons:commons-lang3@3.8.1
    Remediation: Upgrade to org.apache.maven:maven-core@3.9.8.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-resolver-provider@3.8.5 org.apache.maven.resolver:maven-resolver-impl@1.6.3 org.apache.commons:commons-lang3@3.8.1
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-model-builder@3.8.5 org.apache.maven:maven-artifact@3.8.5 org.apache.commons:commons-lang3@3.8.1
    Remediation: Upgrade to org.apache.maven:maven-core@3.9.8.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-plugin-api@3.8.5 org.apache.maven:maven-artifact@3.8.5 org.apache.commons:commons-lang3@3.8.1
    Remediation: Upgrade to org.apache.maven:maven-core@3.9.8.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-resolver-provider@3.8.5 org.apache.maven:maven-model-builder@3.8.5 org.apache.maven:maven-artifact@3.8.5 org.apache.commons:commons-lang3@3.8.1
    Remediation: Upgrade to org.apache.maven:maven-core@3.9.8.

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion via the ClassUtils.getClass function. An attacker can cause the application to terminate unexpectedly by providing excessively long input values.

Remediation

Upgrade org.apache.commons:commons-lang3 to version 3.18.0 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: com.fasterxml.jackson.core:jackson-core
  • Introduced through: com.fasterxml.jackson.core:jackson-databind@2.13.3 and com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.core:jackson-databind@2.13.3 com.fasterxml.jackson.core:jackson-core@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.core:jackson-databind@2.15.0.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3 com.fasterxml.jackson.core:jackson-core@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.15.0.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3 com.fasterxml.jackson.core:jackson-databind@2.13.3 com.fasterxml.jackson.core:jackson-core@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.15.0.

Overview

com.fasterxml.jackson.core:jackson-core is a Core Jackson abstractions, basic JSON streaming API implementation

Affected versions of this package are vulnerable to Denial of Service (DoS) due to missing input size validation when performing numeric type conversions. A remote attacker can exploit this vulnerability by causing the application to deserialize data containing certain numeric types with large values, causing the application to exhaust all available resources.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade com.fasterxml.jackson.core:jackson-core to version 2.15.0-rc1 or higher.

References

high severity

Stack-based Buffer Overflow

  • Vulnerable module: com.fasterxml.jackson.core:jackson-core
  • Introduced through: com.fasterxml.jackson.core:jackson-databind@2.13.3 and com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.core:jackson-databind@2.13.3 com.fasterxml.jackson.core:jackson-core@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.core:jackson-databind@2.15.0.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3 com.fasterxml.jackson.core:jackson-core@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.15.0.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3 com.fasterxml.jackson.core:jackson-databind@2.13.3 com.fasterxml.jackson.core:jackson-core@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.15.0.

Overview

com.fasterxml.jackson.core:jackson-core is a Core Jackson abstractions, basic JSON streaming API implementation

Affected versions of this package are vulnerable to Stack-based Buffer Overflow due to the parse process, which accepts an unlimited input file with deeply nested data. An attacker can cause a stack overflow and crash the application by providing input files with excessively deep nesting.

Remediation

Upgrade com.fasterxml.jackson.core:jackson-core to version 2.15.0-rc1 or higher.

References

medium severity

Uncontrolled Resource Consumption ('Resource Exhaustion')

  • Vulnerable module: commons-io:commons-io
  • Introduced through: org.apache.maven:maven-core@3.8.5

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven.shared:maven-shared-utils@3.3.4 commons-io:commons-io@2.6

Overview

commons-io:commons-io is a The Apache Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more.

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') through the XmlStreamReader class. An attacker can cause the application to consume excessive CPU resources by sending specially crafted XML content.

Remediation

Upgrade commons-io:commons-io to version 2.14.0 or higher.

References

medium severity

Denial of Service (DoS)

  • Vulnerable module: com.fasterxml.jackson.core:jackson-databind
  • Introduced through: com.fasterxml.jackson.core:jackson-databind@2.13.3 and com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.core:jackson-databind@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.core:jackson-databind@2.13.4.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3 com.fasterxml.jackson.core:jackson-databind@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.4.

Overview

com.fasterxml.jackson.core:jackson-databind is a library which contains the general-purpose data-binding functionality and tree-model for Jackson Data Processor.

Affected versions of this package are vulnerable to Denial of Service (DoS) in the _deserializeFromArray() function in BeanDeserializer, due to resource exhaustion when processing a deeply nested array.

NOTE: For this vulnerability to be exploitable the non-default DeserializationFeature must be enabled.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade com.fasterxml.jackson.core:jackson-databind to version 2.12.7.1, 2.13.4 or higher.

References

medium severity

Denial of Service (DoS)

  • Vulnerable module: com.fasterxml.jackson.core:jackson-databind
  • Introduced through: com.fasterxml.jackson.core:jackson-databind@2.13.3 and com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.core:jackson-databind@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.core:jackson-databind@2.13.4.1.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3 com.fasterxml.jackson.core:jackson-databind@2.13.3
    Remediation: Upgrade to com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.5.

Overview

com.fasterxml.jackson.core:jackson-databind is a library which contains the general-purpose data-binding functionality and tree-model for Jackson Data Processor.

Affected versions of this package are vulnerable to Denial of Service (DoS) in the _deserializeWrappedValue() function in StdDeserializer.java, due to resource exhaustion when processing deeply nested arrays.

NOTE: This vulnerability is only exploitable when the non-default UNWRAP_SINGLE_VALUE_ARRAYS feature is enabled.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade com.fasterxml.jackson.core:jackson-databind to version 2.12.7.1, 2.13.4.1 or higher.

References

medium severity

Denial of Service (DoS)

  • Vulnerable module: com.fasterxml.woodstox:woodstox-core
  • Introduced through: com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.3 com.fasterxml.woodstox:woodstox-core@6.2.7
    Remediation: Upgrade to com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.5.

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS). If the parser is running on user supplied input, an attacker may supply content that causes the parser to crash by stack overflow.

NOTE: This vulnerability was originally reported five times and received five CVE IDs. These have since been corrected to be duplicate references to the same issue.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade com.fasterxml.woodstox:woodstox-core to version 5.4.0, 6.4.0 or higher.

References

medium severity

Directory Traversal

  • Vulnerable module: commons-io:commons-io
  • Introduced through: org.apache.maven:maven-core@3.8.5

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven.shared:maven-shared-utils@3.3.4 commons-io:commons-io@2.6
    Remediation: Upgrade to org.apache.maven:maven-core@3.9.7.

Overview

commons-io:commons-io is a The Apache Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more.

Affected versions of this package are vulnerable to Directory Traversal via calling the method FileNameUtils.normalize using an improper string like //../foo or \\..\foo, which may allow access to files in the parent directory.

Details

A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.

Directory Traversal vulnerabilities can be generally divided into two types:

  • Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.

st is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public route.

If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.

curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa

Note %2e is the URL encoded version of . (dot).

  • Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as Zip-Slip.

One way to achieve this is by using a malicious zip archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.

The following is an example of a zip archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/ overwriting the authorized_keys file:

2018-04-15 22:04:29 .....           19           19  good.txt
2018-04-15 22:04:42 .....           20           20  ../../../../../../root/.ssh/authorized_keys

Remediation

Upgrade commons-io:commons-io to version 2.7 or higher.

References

medium severity

EPL-1.0 license

  • Module: org.eclipse.sisu:org.eclipse.sisu.inject
  • Introduced through: org.apache.maven:maven-core@3.8.5

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.eclipse.sisu:org.eclipse.sisu.inject@0.3.5
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-model-builder@3.8.5 org.eclipse.sisu:org.eclipse.sisu.inject@0.3.5
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.eclipse.sisu:org.eclipse.sisu.plexus@0.3.5 org.eclipse.sisu:org.eclipse.sisu.inject@0.3.5
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-resolver-provider@3.8.5 org.apache.maven:maven-model-builder@3.8.5 org.eclipse.sisu:org.eclipse.sisu.inject@0.3.5
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-plugin-api@3.8.5 org.eclipse.sisu:org.eclipse.sisu.plexus@0.3.5 org.eclipse.sisu:org.eclipse.sisu.inject@0.3.5

EPL-1.0 license

medium severity

EPL-1.0 license

  • Module: org.eclipse.sisu:org.eclipse.sisu.plexus
  • Introduced through: org.apache.maven:maven-core@3.8.5

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.eclipse.sisu:org.eclipse.sisu.plexus@0.3.5
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 org.apache.maven:maven-plugin-api@3.8.5 org.eclipse.sisu:org.eclipse.sisu.plexus@0.3.5

EPL-1.0 license

low severity

Creation of Temporary File in Directory with Insecure Permissions

  • Vulnerable module: com.google.guava:guava
  • Introduced through: org.apache.maven:maven-core@3.8.5

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 com.google.inject:guice@4.2.2 com.google.guava:guava@25.1-android

Overview

com.google.guava:guava is a set of core libraries that includes new collection types (such as multimap and multiset,immutable collections, a graph library, functional types, an in-memory cache and more.

Affected versions of this package are vulnerable to Creation of Temporary File in Directory with Insecure Permissions due to the use of Java's default temporary directory for file creation in FileBackedOutputStream. Other users and apps on the machine with access to the default Java temporary directory can access the files created by this class. This more fully addresses the underlying issue described in CVE-2020-8908, by deprecating the permissive temp file creation behavior.

NOTE: Even though the security vulnerability is fixed in version 32.0.0, the maintainers recommend using version 32.0.1, as version 32.0.0 breaks some functionality under Windows.

Remediation

Upgrade com.google.guava:guava to version 32.0.0-android, 32.0.0-jre or higher.

References

low severity

Information Disclosure

  • Vulnerable module: com.google.guava:guava
  • Introduced through: org.apache.maven:maven-core@3.8.5

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.apache.maven:maven-core@3.8.5 com.google.inject:guice@4.2.2 com.google.guava:guava@25.1-android

Overview

com.google.guava:guava is a set of core libraries that includes new collection types (such as multimap and multiset,immutable collections, a graph library, functional types, an in-memory cache and more.

Affected versions of this package are vulnerable to Information Disclosure. The file permissions on the file created by com.google.common.io.Files.createTempDir allow an attacker running a malicious program co-resident on the same machine to steal secrets stored in this directory. This is because, by default, on unix-like operating systems the /tmp directory is shared between all users, so if the correct file permissions aren't set by the directory/file creator, the file becomes readable by all other users on that system.

PoC

File guavaTempDir = com.google.common.io.Files.createTempDir();
System.out.println("Guava Temp Dir: " + guavaTempDir.getName());
runLS(guavaTempDir.getParentFile(), guavaTempDir); // Prints the file permissions -> drwxr-xr-x
File child = new File(guavaTempDir, "guava-child.txt");
child.createNewFile();
runLS(guavaTempDir, child); // Prints the file permissions -> -rw-r--r--

For Android developers, choosing a temporary directory API provided by Android is recommended, 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.

Remediation

There is no fix for com.google.guava:guava. However, in version 30.0 and above, the vulnerable functionality has been deprecated. In oder to mitigate this vulnerability, upgrade to version 30.0 or higher and ensure your dependencies don't use the createTempDir or createTempFile methods.

References

low severity

Information Exposure

  • Vulnerable module: org.jetbrains.kotlin:kotlin-stdlib
  • Introduced through: org.jetbrains.kotlin:kotlin-stdlib@1.6.21 and com.slack.api:slack-api-client@1.22.1

Detailed paths

  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c org.jetbrains.kotlin:kotlin-stdlib@1.6.21
    Remediation: Upgrade to org.jetbrains.kotlin:kotlin-stdlib@2.1.0.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.slack.api:slack-api-client@1.22.1 com.squareup.okhttp3:okhttp@4.9.3 org.jetbrains.kotlin:kotlin-stdlib@1.6.21
    Remediation: Upgrade to com.slack.api:slack-api-client@1.35.0.
  • Introduced through: ccguyka/show-updates-maven-plugin@ccguyka/show-updates-maven-plugin#efa2efd0240a79a2f183025a54d9bad8e8d73d8c com.slack.api:slack-api-client@1.22.1 com.squareup.okhttp3:okhttp@4.9.3 com.squareup.okio:okio@2.8.0 org.jetbrains.kotlin:kotlin-stdlib@1.6.21
    Remediation: Upgrade to com.slack.api:slack-api-client@1.23.0.

Overview

org.jetbrains.kotlin:kotlin-stdlib is a Kotlin Standard Library for JVM.

Affected versions of this package are vulnerable to Information Exposure. A Kotlin application using createTempDir or createTempFile and placing sensitive information within either of these locations would be leaking this information in a read-only way to other users also on this system.

Note: As of version 1.4.21, the vulnerable functions have been marked as deprecated. Due to still being usable, this advisory is kept as "unfixed".

PoC by JLLeitschuh

package org.jlleitschuh.sandbox

import org.junit.jupiter.api.Test
import java.io.BufferedReader
import java.io.File
import java.io.IOException
import java.io.InputStreamReader
import java.nio.file.Files

class KotlinTempDirectoryPermissionCheck {
    @Test
    fun `kotlin check default directory permissions`() {
        val dir = createTempDir()
        runLS(dir.parentFile, dir) // Prints drwxr-xr-x
    }

    @Test
    fun `Files check default directory permissions`() {
        val dir = Files.createTempDirectory("random-directory")
        runLS(dir.toFile().parentFile, dir.toFile()) // Prints drwx------
    }

    @Test
    fun `kotlin check default file permissions`() {
        val file = createTempFile()
        runLS(file.parentFile, file) // Prints -rw-r--r--
    }

    @Test
    fun `Files check default file permissions`() {
        val file = Files.createTempFile("random-file", ".txt")
        runLS(file.toFile().parentFile, file.toFile()) // Prints -rw-------
    }

    private fun runLS(file: File, lookingFor: File) {
        val processBuilder = ProcessBuilder()
        processBuilder.command("ls", "-l", file.absolutePath)
        try {
            val process = processBuilder.start()
            val output = StringBuilder()
            val reader = BufferedReader(
                InputStreamReader(process.inputStream)
            )
            reader.lines().forEach { line ->
                if (line.contains("total")) {
                    output.append(line).append('\n')
                }
                if (line.contains(lookingFor.name)) {
                    output.append(line).append('\n')
                }
            }
            val exitVal = process.waitFor()
            if (exitVal == 0) {
                println("Success!")
                println(output)
            } else {
                //abnormal...
            }
        } catch (e: IOException) {
            e.printStackTrace()
        } catch (e: InterruptedException) {
            e.printStackTrace()
        }
    }
}

Remediation

Upgrade org.jetbrains.kotlin:kotlin-stdlib to version 2.1.0 or higher.

References