Vulnerabilities

11 via 31 paths

Dependencies

90

Source

GitHub

Commit

fecb42eb

Find, fix and prevent vulnerabilities in your code.

Severity
  • 5
  • 5
  • 1
Status
  • 11
  • 0
  • 0

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: software.amazon.ion:ion-java
  • Introduced through: com.amazonaws:aws-java-sdk-s3@1.12.311

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.amazonaws:aws-java-sdk-s3@1.12.311 com.amazonaws:aws-java-sdk-core@1.12.311 software.amazon.ion:ion-java@1.0.2
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.amazonaws:aws-java-sdk-s3@1.12.311 com.amazonaws:aws-java-sdk-kms@1.12.311 com.amazonaws:aws-java-sdk-core@1.12.311 software.amazon.ion:ion-java@1.0.2

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the deserialization of Ion text encoded data or the IonValue model processing. An attacker can cause a StackOverflowError by crafting malicious Ion data that triggers excessive resource consumption when loaded or processed. This is only exploitable if the application deserializes Ion data from an untrusted source or data that could have been tampered with.

Notes:

According to the README.md file of this package, its domain changed from software.amazon.ion to com.amazon.ion. Please be aware that this vulnerability affects versions of both domains of this package.

For a fix, please check the advisory on the maintained package.

Workaround

This vulnerability can be mitigated by not loading data from untrusted sources or that could have been tampered with.

Remediation

A fix was pushed into the master branch but not yet published.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: ch.qos.logback:logback-classic
  • Introduced through: ch.qos.logback:logback-classic@1.4.0

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b ch.qos.logback:logback-classic@1.4.0
    Remediation: Upgrade to ch.qos.logback:logback-classic@1.4.12.

Overview

ch.qos.logback:logback-classic is a reliable, generic, fast and flexible logging library for Java.

Affected versions of this package are vulnerable to Denial of Service (DoS). An attacker can mount a denial-of-service attack by sending poisoned data. This is only exploitable if logback receiver component is deployed.

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 ch.qos.logback:logback-classic to version 1.2.13, 1.3.12, 1.4.12 or higher.

References

high severity

Uncontrolled Resource Consumption ('Resource Exhaustion')

  • Vulnerable module: ch.qos.logback:logback-classic
  • Introduced through: ch.qos.logback:logback-classic@1.4.0

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b ch.qos.logback:logback-classic@1.4.0
    Remediation: Upgrade to ch.qos.logback:logback-classic@1.4.14.

Overview

ch.qos.logback:logback-classic is a reliable, generic, fast and flexible logging library for Java.

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') via the logback receiver component. An attacker can mount a denial-of-service attack by sending poisoned data.

Note:

Successful exploitation requires the logback-receiver component being enabled and also reachable by the attacker.

Remediation

Upgrade ch.qos.logback:logback-classic to version 1.2.13, 1.3.14, 1.4.14 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: ch.qos.logback:logback-core
  • Introduced through: ch.qos.logback:logback-core@1.4.0 and ch.qos.logback:logback-classic@1.4.0

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b ch.qos.logback:logback-core@1.4.0
    Remediation: Upgrade to ch.qos.logback:logback-core@1.4.12.
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b ch.qos.logback:logback-classic@1.4.0 ch.qos.logback:logback-core@1.4.0
    Remediation: Upgrade to ch.qos.logback:logback-classic@1.4.12.

Overview

ch.qos.logback:logback-core is a logback-core module.

Affected versions of this package are vulnerable to Denial of Service (DoS). An attacker can mount a denial-of-service attack by sending poisoned data. This is only exploitable if logback receiver component is deployed.

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 ch.qos.logback:logback-core to version 1.2.13, 1.3.12, 1.4.12 or higher.

References

high severity

Uncontrolled Resource Consumption ('Resource Exhaustion')

  • Vulnerable module: ch.qos.logback:logback-core
  • Introduced through: ch.qos.logback:logback-core@1.4.0 and ch.qos.logback:logback-classic@1.4.0

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b ch.qos.logback:logback-core@1.4.0
    Remediation: Upgrade to ch.qos.logback:logback-core@1.4.14.
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b ch.qos.logback:logback-classic@1.4.0 ch.qos.logback:logback-core@1.4.0
    Remediation: Upgrade to ch.qos.logback:logback-classic@1.4.14.

Overview

ch.qos.logback:logback-core is a logback-core module.

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') via the logback receiver component. An attacker can mount a denial-of-service attack by sending poisoned data.

Note:

Successful exploitation requires the logback-receiver component being enabled and also reachable by the attacker.

Remediation

Upgrade ch.qos.logback:logback-core to version 1.2.13, 1.3.14, 1.4.14 or higher.

References

medium severity

Arbitrary Code Execution

  • Vulnerable module: org.yaml:snakeyaml
  • Introduced through: org.yaml:snakeyaml@1.33

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b org.yaml:snakeyaml@1.33
    Remediation: Upgrade to org.yaml:snakeyaml@2.0.

Overview

org.yaml:snakeyaml is a YAML 1.1 parser and emitter for Java.

Affected versions of this package are vulnerable to Arbitrary Code Execution in the Constructor class, which does not restrict which types can be deserialized. This vulnerability is exploitable by an attacker who provides a malicious YAML file for deserialization, which circumvents the SafeConstructor class.

The maintainers of the library contend that the application's trust would already have had to be compromised or established and therefore dispute the risk associated with this issue on the basis that there is a high bar for exploitation.

Remediation

Upgrade org.yaml:snakeyaml to version 2.0 or higher.

References

medium severity

Denial of Service (DoS)

  • Vulnerable module: com.squareup.okio:okio-jvm
  • Introduced through: com.squareup.okhttp3:okhttp@4.10.0 and com.github.seratch:jslack@1.8.1

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0
    Remediation: Upgrade to com.squareup.okhttp3:okhttp@4.11.0.
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS) due to improper exception handling by the GzipSource class when parsing a malformed gzip buffer.

This vulnerability can be exploited on the Okio client when handling a crafted GZIP archive.

PoC

val gzBuf: Buffer = Buffer()
    try {
        val gzByteString: ByteString = ("1f8b41ff424242424343ffff").decodeHex()
        gzBuf.write(gzByteString)
        val gz: GzipSource = GzipSource(gzBuf)
        val sinkBuf: Buffer = Buffer()
        gz.read(sinkBuf, 5)
    }
    catch(e: IOException) {
        println("got error: " + e.toString())
    }

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.squareup.okio:okio-jvm to version 3.4.0 or higher.

References

medium severity

Denial of Service (DoS)

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

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.fasterxml.woodstox:woodstox-core@5.3.0
    Remediation: Upgrade to com.fasterxml.woodstox:woodstox-core@5.4.0.
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.fasterxml.jackson.dataformat:jackson-dataformat-xml@2.13.1 com.fasterxml.woodstox:woodstox-core@5.3.0
    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: io.vertx:vertx-web-api-contract@3.9.14

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b io.vertx:vertx-web-api-contract@3.9.14 io.swagger.parser.v3:swagger-parser-v3@2.0.21 commons-io:commons-io@2.6
    Remediation: Upgrade to io.vertx:vertx-web-api-contract@4.3.2.
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b io.vertx:vertx-web-api-contract@3.9.14 io.swagger.parser.v3:swagger-parser-v3@2.0.21 io.swagger.core.v3:swagger-core@2.1.4 commons-io:commons-io@2.6
    Remediation: Upgrade to io.vertx:vertx-web-api-contract@3.9.14.

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
new

NULL Pointer Dereference

  • Vulnerable module: joda-time:joda-time
  • Introduced through: com.amazonaws:aws-java-sdk-s3@1.12.311

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.amazonaws:aws-java-sdk-s3@1.12.311 com.amazonaws:aws-java-sdk-core@1.12.311 joda-time:joda-time@2.8.1
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.amazonaws:aws-java-sdk-s3@1.12.311 com.amazonaws:aws-java-sdk-kms@1.12.311 com.amazonaws:aws-java-sdk-core@1.12.311 joda-time:joda-time@2.8.1

Overview

Affected versions of this package are vulnerable to NULL Pointer Dereference via the component org.joda.time.format.PeriodFormat::wordBased(Locale). An attacker can trigger a NullPointerException by supplying a null value to the Locale parameter.

Remediation

There is no fixed version for joda-time:joda-time.

References

low severity

Information Exposure

  • Vulnerable module: org.jetbrains.kotlin:kotlin-stdlib
  • Introduced through: com.squareup.okhttp3:okhttp@4.10.0 and com.github.seratch:jslack@1.8.1

Detailed paths

  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.squareup.okhttp3:okhttp@4.10.0 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib-jdk7@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib-jdk7@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib-jdk7@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20
  • Introduced through: uclalibrary/bucketeer@uclalibrary/bucketeer#fecb42ebc09ee7522ce0ac1f76760a708065160b com.github.seratch:jslack@1.8.1 com.github.seratch:jslack-app-backend@1.8.1 com.github.seratch:jslack-api-client@1.8.1 com.squareup.okhttp3:okhttp@4.10.0 com.squareup.okio:okio-jvm@3.0.0 org.jetbrains.kotlin:kotlin-stdlib-jdk8@1.5.31 org.jetbrains.kotlin:kotlin-stdlib-jdk7@1.5.31 org.jetbrains.kotlin:kotlin-stdlib@1.6.20

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

There is no fixed version for org.jetbrains.kotlin:kotlin-stdlib.

References