Snyk - Open Source Security

Snyk test report

February 13th 2025, 8:35:29 pm (UTC+00:00)

Scanned the following paths:
  • /home/medgar/git/streamshub-console/pom.xml (maven)
  • /home/medgar/git/streamshub-console/api/pom.xml (maven)
  • /home/medgar/git/streamshub-console/common/pom.xml (maven)
  • /home/medgar/git/streamshub-console/operator/pom.xml (maven)
  • /home/medgar/git/streamshub-console/ui/package-lock.json (npm)
  • /home/medgar/git/streamshub-console/ui/pom.xml (maven)
  • /home/medgar/git/streamshub-console/ui/.next/package.json (npm)
  • /home/medgar/git/streamshub-console/ui/.next/types/package.json (npm)
5 known vulnerabilities
7 vulnerable dependency paths
1027 dependencies

Denial of Service (DoS)

high severity

  • Manifest file: /home/medgar/git/streamshub-console api/pom.xml
  • Package Manager: maven
  • Vulnerable module: net.minidev:json-smart
  • Introduced through: com.github.streamshub:console-api@0.6.3, io.strimzi:kafka-oauth-client@0.15.0 and others

Detailed paths

  • Introduced through: com.github.streamshub:console-api@0.6.3 io.strimzi:kafka-oauth-client@0.15.0 io.strimzi:kafka-oauth-common@0.15.0 com.jayway.jsonpath:json-path@2.9.0 net.minidev:json-smart@2.5.0

Overview

net.minidev:json-smart is a Java JSON parser.

Affected versions of this package are vulnerable to Denial of Service (DoS). An attacker can cause a stack exhaustion and subsequent service disruption by providing JSON input with an excessive number of nested {.

Note:

This issue exists because of an incomplete fix for CVE-2023-1370.

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 net.minidev:json-smart to version 2.5.2 or higher.

References


Improper Validation of Specified Quantity in Input

high severity

  • Manifest file: /home/medgar/git/streamshub-console api/pom.xml
  • Package Manager: maven
  • Vulnerable module: io.netty:netty-handler
  • Introduced through: com.github.streamshub:console-api@0.6.3, io.quarkus:quarkus-rest@3.15.3 and others

Detailed paths

  • Introduced through: com.github.streamshub:console-api@0.6.3 io.quarkus:quarkus-rest@3.15.3 io.quarkus:quarkus-virtual-threads@3.15.3 io.vertx:vertx-core@4.5.11 io.netty:netty-handler@4.1.115.Final
  • Introduced through: com.github.streamshub:console-operator@0.6.3 io.quarkus:quarkus-test-kubernetes-client@3.15.3 io.fabric8:kubernetes-httpclient-vertx@6.13.4 io.vertx:vertx-core@4.5.11 io.netty:netty-handler@4.1.115.Final

Overview

io.netty:netty-handler is a library that provides an asynchronous event-driven network application framework and tools for rapid development of maintainable high performance and high scalability protocol servers and clients. In other words, Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server.

Affected versions of this package are vulnerable to Improper Validation of Specified Quantity in Input when validating SSL packets using the native SSLEngine. The SSL_RECORD_HEADER_LENGTH of an incoming packet is not properly checked in the getEncryptedPacketLength() function, allowing attackers to trigger a crash by sending malicious packets.

Workaround

This vulnerability can be avoided by not using the native SSLEngine.

Remediation

Upgrade io.netty:netty-handler to version 4.1.118.Final, 4.2.0.RC3 or higher.

References


Improper Validation of Specified Quantity in Input

medium severity

  • Manifest file: /home/medgar/git/streamshub-console api/pom.xml
  • Package Manager: maven
  • Vulnerable module: io.netty:netty-common
  • Introduced through: com.github.streamshub:console-api@0.6.3, io.quarkus:quarkus-rest@3.15.3 and others

Detailed paths

  • Introduced through: com.github.streamshub:console-api@0.6.3 io.quarkus:quarkus-rest@3.15.3 io.quarkus:quarkus-virtual-threads@3.15.3 io.vertx:vertx-core@4.5.11 io.netty:netty-common@4.1.115.Final
  • Introduced through: com.github.streamshub:console-operator@0.6.3 io.quarkus:quarkus-test-kubernetes-client@3.15.3 io.fabric8:kubernetes-httpclient-vertx@6.13.4 io.vertx:vertx-core@4.5.11 io.netty:netty-common@4.1.115.Final

Overview

Affected versions of this package are vulnerable to Improper Validation of Specified Quantity in Input in BufferedReader.readLine(), which does not count null bytes when calculating the acceptable size of an input stream. An attacker can cause the application to crash by creating a large file in C:\etc\os-release or C:\usr\lib\os-release which the application attempts to load. If the file exceeds the JVM's memory limit (1 GB by default) the application will crash when loading it into memory.

Note: This vulnerability affects only Windows environments and is a bypass for the previously reported and fixed CVE-2024-47535.

Remediation

Upgrade io.netty:netty-common to version 4.1.118, 4.2.0.RC3 or higher.

References


Missing Release of Resource after Effective Lifetime

medium severity

  • Manifest file: /home/medgar/git/streamshub-console ui/package-lock.json
  • Package Manager: npm
  • Vulnerable module: inflight
  • Introduced through: console-ui@0.6.3, eslint@8.57.1 and others

Detailed paths

  • Introduced through: console-ui@0.6.3 eslint@8.57.1 file-entry-cache@6.0.1 flat-cache@3.2.0 rimraf@3.0.2 glob@7.2.3 inflight@1.0.6

Overview

Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime via the makeres function due to improperly deleting keys from the reqs object after execution of callbacks. This behavior causes the keys to remain in the reqs object, which leads to resource exhaustion.

Exploiting this vulnerability results in crashing the node process or in the application crash.

Note: This library is not maintained, and currently, there is no fix for this issue. To overcome this vulnerability, several dependent packages have eliminated the use of this library.

To trigger the memory leak, an attacker would need to have the ability to execute or influence the asynchronous operations that use the inflight module within the application. This typically requires access to the internal workings of the server or application, which is not commonly exposed to remote users. Therefore, “Attack vector” is marked as “Local”.

PoC

const inflight = require('inflight');
        
        function testInflight() {
          let i = 0;
          function scheduleNext() {
            let key = `key-${i++}`;
            const callback = () => {
            };
            for (let j = 0; j < 1000000; j++) {
              inflight(key, callback);
            }
        
            setImmediate(scheduleNext);
          }
        
        
          if (i % 100 === 0) {
            console.log(process.memoryUsage());
          }
        
          scheduleNext();
        }
        
        testInflight();
        

Remediation

There is no fixed version for inflight.

References


Information Exposure

low severity

  • Manifest file: /home/medgar/git/streamshub-console api/pom.xml
  • Package Manager: maven
  • Vulnerable module: org.jetbrains.kotlin:kotlin-stdlib
  • Introduced through: com.github.streamshub:console-api@0.6.3, io.apicurio:apicurio-registry-serdes-protobuf-serde@2.6.8.Final and others

Detailed paths

  • Introduced through: com.github.streamshub:console-api@0.6.3 io.apicurio:apicurio-registry-serdes-protobuf-serde@2.6.8.Final io.apicurio:apicurio-registry-schema-util-protobuf@2.6.8.Final io.apicurio:apicurio-registry-protobuf-schema-utilities@2.6.8.Final com.squareup.okio:okio-jvm@3.9.1 org.jetbrains.kotlin:kotlin-stdlib@2.0.10

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