Miggo Logo

CVE-2025-11966: Vert.x-Web vulnerable to Stored Cross-site Scripting in directory listings via file names

N/A

CVSS Score

Basic Information

EPSS Score
-
Published
10/22/2025
Updated
10/22/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
io.vertx:vertx-webmaven< 4.5.224.5.22
io.vertx:vertx-webmaven>= 5.0.0, <= 5.0.45.0.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability exists in the sendDirectoryListing method of the StaticHandlerImpl class. The provided vulnerability description explicitly points to this method and the lack of HTML escaping for file names when generating directory listings. To confirm this, I analyzed the commits that patched the vulnerability in versions 4.5.22 and 5.0.5 of vertx-web. The commits f2dbc2a364e6dddcfe50f1dd66d27b8b3e715368 and 121d09c1c34ff23f16d0df63b988579ca9f3f970 clearly show the fix. Before the patch, the file variable (containing the filename) was concatenated directly into the HTML string. The patch introduces calls to Utils.encodeUriPath for the href attribute and Utils.escapeHTML for the title attribute and the link text. This prevents the browser from interpreting malicious file names as code. Therefore, the sendDirectoryListing function is the exact location of the vulnerability, as it is responsible for processing the untrusted file names and generating the unsafe HTML output.

Vulnerable functions

io.vertx.ext.web.handler.impl.StaticHandlerImpl.sendDirectoryListing
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
The `sendDirectoryListing` function is vulnerable to stored XSS because it constructs an HTML directory listing by directly embedding file names into the `href` and `title` attributes of an `<a>` tag, as well as the link text itself, without proper HTML escaping or URL encoding. An attacker who can create files with malicious names (e.g., containing HTML and JavaScript) on the file system can cause that code to be executed in the browser of any user who views the directory listing.

WAF Protection Rules

WAF Rule

# **s*ription - In t** `St*ti***n*l*rImpl#s*n**ir**toryListin*(...)` m*t*o* un**r t** `t*xt/*tml` *r*n**, *il* *n* *ir**tory n*m*s *r* *ir**tly *m****** into t** `*r**`, `titl*`, *n* link t*xt wit*out prop*r *TML *s**pin*. - *s * r*sult, in *nvironm

Reasoning

T** vuln*r**ility *xists in t** `s*n**ir**toryListin*` m*t*o* o* t** `St*ti***n*l*rImpl` *l*ss. T** provi*** vuln*r**ility **s*ription *xpli*itly points to t*is m*t*o* *n* t** l**k o* *TML *s**pin* *or *il* n*m*s w**n **n*r*tin* *ir**tory listin*s. T