ghsa-53jx-vvf9-4x38
Vulnerability from github
Summary
When running vertx web applications that serve files using StaticHandler
on Windows Operating Systems and Windows File Systems, if the mount point is a wildcard (*
) then an attacker can exfiltrate any class path resource.
Details
When computing the relative path to locate the resource, in case of wildcards, the code:
https://github.com/vert-x3/vertx-web/blob/62c0d66fa1c179ae6a4d57344631679a2b97e60f/vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java#L83
returns the user input (without validation) as the segment to lookup. Even though checks are performed to avoid escaping the sandbox, given that the input was not sanitized \
are not properly handled and an attacker can build a path that is valid within the classpath.
PoC
https://github.com/adrien-aubert-drovio/vertx-statichandler-windows-traversal-path-vulnerability
{ affected: [ { package: { ecosystem: "Maven", name: "io.vertx:vertx-web", }, ranges: [ { events: [ { introduced: "4.0.0", }, { fixed: "4.3.8", }, ], type: "ECOSYSTEM", }, ], }, ], aliases: [ "CVE-2023-24815", ], database_specific: { cwe_ids: [ "CWE-22", ], github_reviewed: true, github_reviewed_at: "2023-02-10T03:27:58Z", nvd_published_at: "2023-02-09T18:15:00Z", severity: "MODERATE", }, details: "### Summary\n\nWhen running vertx web applications that serve files using `StaticHandler` on Windows Operating Systems and Windows File Systems, if the mount point is a wildcard (`*`) then an attacker can exfiltrate any class path resource.\n\n\n### Details\nWhen computing the relative path to locate the resource, in case of wildcards, the code:\n\nhttps://github.com/vert-x3/vertx-web/blob/62c0d66fa1c179ae6a4d57344631679a2b97e60f/vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java#L83\n\nreturns the user input (without validation) as the segment to lookup. Even though checks are performed to avoid escaping the sandbox, given that the input was not sanitized `\\` are not properly handled and an attacker can build a path that is valid within the classpath.\n\n### PoC\n\nhttps://github.com/adrien-aubert-drovio/vertx-statichandler-windows-traversal-path-vulnerability", id: "GHSA-53jx-vvf9-4x38", modified: "2023-02-10T03:27:58Z", published: "2023-02-10T03:27:58Z", references: [ { type: "WEB", url: "https://github.com/vert-x3/vertx-web/security/advisories/GHSA-53jx-vvf9-4x38", }, { type: "ADVISORY", url: "https://nvd.nist.gov/vuln/detail/CVE-2023-24815", }, { type: "WEB", url: "https://github.com/vert-x3/vertx-web/commit/9e3a783b1d1a731055e9049078b1b1494ece9c15", }, { type: "PACKAGE", url: "https://github.com/vert-x3/vertx-web", }, { type: "WEB", url: "https://github.com/vert-x3/vertx-web/blob/62c0d66fa1c179ae6a4d57344631679a2b97e60f/vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java#L83", }, ], schema_version: "1.4.0", severity: [ { score: "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N", type: "CVSS_V3", }, ], summary: "StaticHandler disclosure of classpath resources on Windows when mounted on a wildcard route", }
Log in or create an account to share your comment.
This schema specifies the format of a comment related to a security advisory.
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.