LifeMC/LifeSkript:pom.xml

Vulnerabilities

2 via 2 paths

Dependencies

15

Source

GitHub

Commit

1ec8f1da

Find, fix and prevent vulnerabilities in your code.

Issue type
  • 2
  • 2
Severity
  • 2
  • 2
Status
  • 4
  • 0
  • 0

medium severity
new

LGPL-2.1 license

  • Module: com.github.spotbugs:spotbugs-annotations
  • Introduced through: com.github.spotbugs:spotbugs-annotations@4.7.3

Detailed paths

  • Introduced through: LifeMC/LifeSkript@LifeMC/LifeSkript#1ec8f1daaacdb55f7a7281b92ddbbe8f5514856e com.github.spotbugs:spotbugs-annotations@4.7.3

LGPL-2.1 license

medium severity
new

EPL-1.0 license

  • Module: org.eclipse.jdt:org.eclipse.jdt.annotation
  • Introduced through: org.eclipse.jdt:org.eclipse.jdt.annotation@1.2.100

Detailed paths

  • Introduced through: LifeMC/LifeSkript@LifeMC/LifeSkript#1ec8f1daaacdb55f7a7281b92ddbbe8f5514856e org.eclipse.jdt:org.eclipse.jdt.annotation@1.2.100

EPL-1.0 license

low severity

Creation of Temporary File in Directory with Insecure Permissions

  • Vulnerable module: com.google.guava:guava
  • Introduced through: com.google.guava:guava@31.1-jre

Detailed paths

  • Introduced through: LifeMC/LifeSkript@LifeMC/LifeSkript#1ec8f1daaacdb55f7a7281b92ddbbe8f5514856e com.google.guava:guava@31.1-jre
    Remediation: Upgrade to com.google.guava:guava@32.0.0-jre.

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 Exposure

  • Vulnerable module: org.jetbrains.kotlin:kotlin-stdlib
  • Introduced through: org.jetbrains.kotlin:kotlin-stdlib@1.8.0

Detailed paths

  • Introduced through: LifeMC/LifeSkript@LifeMC/LifeSkript#1ec8f1daaacdb55f7a7281b92ddbbe8f5514856e org.jetbrains.kotlin:kotlin-stdlib@1.8.0
    Remediation: Upgrade to org.jetbrains.kotlin:kotlin-stdlib@2.1.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