CVE-2023-24815 Disclosure of classpath resources on Windows when mounted on a wildcard route in vertx-web

Medium 4.8 Published Updated

Attackers can exfiltrate classpath resources on Windows deployments using wildcard routes due to improper path validation in Vert.x Web.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-24815?

CVE-2023-24815 is a medium-severity path traversal vulnerability in vert-x3 vertx-web, published on 9 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Vert.x-Web is a set of building blocks for building web applications in the java programming language. 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. When computing the relative path to locate the resource, in case of wildcards, the code: `return "/" + rest;` from `Utils.java` 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. This issue only affects users deploying in windows environments and upgrading is the advised remediation path. There are no known workarounds for this vulnerability.

Weakness: CWE-22

Which versions are affected by CVE-2023-24815?

2 open source packages ship an affected version, including io.vertx:vertx-web. It affects 1 product.

PackageAffectedFixed in
io.vertx:vertx-web MavenFrom 4.0.04.3.8
io.vertx:vertx-web MavenFrom 4.0.04.3.8

Products include Eclipse Vert.x-Web.

How do I fix CVE-2023-24815?

Upgrade io.vertx:vertx-web to 4.3.8 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2023-24815 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-24815 exists.

Sources

Also known as GHSA-53jx-vvf9-4x38.

Is CVE-2023-24815 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free