Snyk test report
- /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)
Denial of Service (DoS)
Detailed paths
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
wspackage
Remediation
Upgrade net.minidev:json-smart to version 2.5.2 or higher.
References
Improper Validation of Specified Quantity in Input
Detailed paths
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
Detailed paths
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
Detailed paths
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
Detailed paths
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.