Find, fix and prevent vulnerabilities in your code.
high severity
- Vulnerable module: io.vertx:vertx-web
- Introduced through: net.wissel.salesforce:vertx-sfdc-core@0.3.5
Detailed paths
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › net.wissel.salesforce:vertx-sfdc-core@0.3.5 › io.vertx:vertx-web@3.5.4
Overview
io.vertx:vertx-web is a HTTP web applications for Vert.x.
Affected versions of this package are vulnerable to Files or Directories Accessible to External Parties via improper handling of hidden directories in the StaticHandler implementation when the setIncludeHidden(false) configuration is set. An attacker can access sensitive files within hidden directories by directly requesting their paths, potentially exposing confidential information like credentials, configuration files, or source code.
Remediation
Upgrade io.vertx:vertx-web to version 4.5.22, 5.0.5 or higher.
References
high severity
- Module: org.jruby:jruby-complete
- Introduced through: io.vertx:vertx-lang-ruby@3.5.4
Detailed paths
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-lang-ruby@3.5.4 › org.jruby:jruby-complete@9.1.13.0
Dual license: GPL-2.0, LGPL-2.1
medium severity
- Vulnerable module: io.vertx:vertx-core
- Introduced through: io.vertx:vertx-core@4.5.23, io.vertx:vertx-codetrans@3.5.4 and others
Detailed paths
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-core@4.5.23Remediation: Upgrade to io.vertx:vertx-core@4.5.24.
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-codetrans@3.5.4 › io.vertx:vertx-core@4.5.23
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-lang-groovy@3.5.4 › io.vertx:vertx-core@4.5.23Remediation: Upgrade to io.vertx:vertx-lang-groovy@4.5.24.
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-lang-js@3.5.4 › io.vertx:vertx-core@4.5.23
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-lang-ruby@3.5.4 › io.vertx:vertx-core@4.5.23
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-redis-client@4.5.23 › io.vertx:vertx-core@4.5.23Remediation: Upgrade to io.vertx:vertx-redis-client@4.5.24.
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-rx-java@3.5.4 › io.vertx:vertx-core@4.5.23Remediation: Upgrade to io.vertx:vertx-rx-java@4.5.24.
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-rx-java2@3.5.4 › io.vertx:vertx-core@4.5.23Remediation: Upgrade to io.vertx:vertx-rx-java2@4.5.24.
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › net.wissel.salesforce:vertx-sfdc-core@0.3.5 › io.vertx:vertx-core@4.5.23
Overview
io.vertx:vertx-core is a tool-kit for building reactive applications on the JVM.
Affected versions of this package are vulnerable to HTTP Request Smuggling due to improper handling of / in the output buffer by removeDots() function in Static Handler. An attacker can prevent access to static files by sending specifically crafted request URIs that exploit improper handling of encoded path traversal sequences.
Workaround
This vulnerability can be mitigated by disabling the Static Handler cache.
Remediation
Upgrade io.vertx:vertx-core to version 4.5.24 or higher.
References
medium severity
- Vulnerable module: org.jetbrains.kotlin:kotlin-stdlib
- Introduced through: io.vertx:vertx-codetrans@3.5.4 and org.jetbrains.kotlin:kotlin-stdlib-jre8@1.2.20
Detailed paths
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-codetrans@3.5.4 › org.jetbrains.kotlin:kotlin-stdlib@1.2.20Remediation: Upgrade to io.vertx:vertx-codetrans@3.7.1.
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › org.jetbrains.kotlin:kotlin-stdlib-jre8@1.2.20 › org.jetbrains.kotlin:kotlin-stdlib@1.2.20
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › org.jetbrains.kotlin:kotlin-stdlib-jre8@1.2.20 › org.jetbrains.kotlin:kotlin-stdlib-jre7@1.2.20 › org.jetbrains.kotlin:kotlin-stdlib@1.2.20
Overview
org.jetbrains.kotlin:kotlin-stdlib is a Kotlin Standard Library for JVM.
Affected versions of this package are vulnerable to Improper Locking due to inability to lock dependencies for Multiplatform Gradle Projects.
Remediation
Upgrade org.jetbrains.kotlin:kotlin-stdlib to version 1.6.0 or higher.
References
low severity
- Vulnerable module: org.jetbrains.kotlin:kotlin-stdlib
- Introduced through: io.vertx:vertx-codetrans@3.5.4 and org.jetbrains.kotlin:kotlin-stdlib-jre8@1.2.20
Detailed paths
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › io.vertx:vertx-codetrans@3.5.4 › org.jetbrains.kotlin:kotlin-stdlib@1.2.20Remediation: Upgrade to io.vertx:vertx-codetrans@3.7.1.
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › org.jetbrains.kotlin:kotlin-stdlib-jre8@1.2.20 › org.jetbrains.kotlin:kotlin-stdlib@1.2.20
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › org.jetbrains.kotlin:kotlin-stdlib-jre8@1.2.20 › org.jetbrains.kotlin:kotlin-stdlib-jre7@1.2.20 › org.jetbrains.kotlin:kotlin-stdlib@1.2.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
Upgrade org.jetbrains.kotlin:kotlin-stdlib to version 2.1.0 or higher.
References
low severity
- Vulnerable module: io.vertx:vertx-web
- Introduced through: net.wissel.salesforce:vertx-sfdc-core@0.3.5
Detailed paths
-
Introduced through: Stwissel/vertx-sfdc-platformevents@Stwissel/vertx-sfdc-platformevents#db233f7eab612c6ab2dc9217c378263ad75be18a › net.wissel.salesforce:vertx-sfdc-core@0.3.5 › io.vertx:vertx-web@3.5.4
Overview
io.vertx:vertx-web is a HTTP web applications for Vert.x.
Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the sendDirectoryListing in StaticHandlerImpl.java. An attacker can execute arbitrary JavaScript in the browser context of users viewing the directory listing page by creating files with specially crafted names that are rendered without proper HTML escaping.
Notes:
- Successful exploitation requires directory listing to be enabled using StaticHandler
(e.g.,
StaticHandler.create("public").setDirectoryListing(true)) - The attacker requires the ability to create arbitrary file names under a public directory (e.g., via upload functionality or a shared directory)
Details
Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.
This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.
Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.
Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, < can be coded as < and > can be coded as > in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses < and > as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.
The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware.
Types of attacks
There are a few methods by which XSS can be manipulated:
| Type | Origin | Description |
|---|---|---|
| Stored | Server | The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link. |
| Reflected | Server | The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser. |
| DOM-based | Client | The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data. |
| Mutated | The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters. |
Affected environments
The following environments are susceptible to an XSS attack:
- Web servers
- Application servers
- Web application environments
How to prevent
This section describes the top best practices designed to specifically protect your code:
- Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches.
- Convert special characters such as
?,&,/,<,>and spaces to their respective HTML or URL encoded equivalents. - Give users the option to disable client-side scripts.
- Redirect invalid requests.
- Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.
- Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.
- Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.
Remediation
Upgrade io.vertx:vertx-web to version 4.5.22, 5.0.5 or higher.