2.3low
Vert.x-Web vulnerable to Stored Cross-site Scripting in directory listings via file names
- Severity
- 2.3low CVSS:4.0 by eclipse
- Exploit likelihood
- 0.30% (higher than 24% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- eclipse
- Also known as
- GHSA-45p5-v273-3qqr
Description
In Eclipse Vert.x versions [4.0.0, 4.5.21] and [5.0.0, 5.0.4], when "directory listing" is enabled, file and directory names are inserted into generated HTML without proper escaping in the href, title, and link attributes. An attacker who can create or rename files or directories within a served path can craft filenames containing malicious script or HTML content, leading to stored cross-site scripting (XSS) that executes in the context of users viewing the affected directory listing.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Eclipse Foundation Vert.x | from 4.0.0 before 4.5.22, from 5.0.0 before 5.0.5 | CVE List |
| io.vertx:vertx-web (Maven) | before 4.5.22, from 5.0.0 before 5.0.5 | GitHub Advisory Database |
| eclipse vert.x | from 4.0.0 before 4.5.22, from 5.0.0 before 5.0.5 | NVD |
All scores
| eclipse | 2.3low CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N |
| GitHub | 4.9low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N |
| GitHub | low CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N |
| NVD | 6.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N |
Classification
What each source says
CVE List
In Eclipse Vert.x versions [4.0.0, 4.5.21] and [5.0.0, 5.0.4], when "directory listing" is enabled, file and directory names are inserted into generated HTML without proper escaping in the href, title, and link attributes. An attacker who can create or rename files or directories within a served path can craft filenames containing malicious script or HTML content, leading to stored cross-site scripting (XSS) that executes in the context of users viewing the affected directory listing.
GitHub Advisory Database
Description
- In the
StaticHandlerImpl#sendDirectoryListing(...)method under thetext/htmlbranch, file and directory names are directly embedded into thehref,title, and link text without proper HTML escaping. - As a result, in environments where an attacker can control file names, injecting HTML/JavaScript is possible. Simply accessing the directory listing page will trigger an XSS.
- Affected Code:
- File:
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java - Lines:
- 709–713:
normalizedDiris constructed without escaping - 714–731:
<li><a ...>elements insert file names directly into attributes and body without escaping - 744: parent directory name construction
- 746–751:
{directory},{parent}, and{files}are inserted into the HTML template without escaping
- 709–713:
- File:
Reproduction Steps
-
Prerequisites:
- Directory listing is enabled using
StaticHandler
(e.g.,StaticHandler.create("public").setDirectoryListing(true)) - The attacker has the ability to create arbitrary file names under a public directory (e.g., via upload functionality or a shared directory)
- Directory listing is enabled using
-
Create a malicious file name (example for Unix-based OS):
- Create an empty file in
public/with one of the following names:<img src=x onerror=alert('XSS')>.txt- Or attribute injection:
evil" onmouseover="alert('XSS')".txt
- Example:
mkdir -p public printf 'test' > "public/<img src=x onerror=alert('XSS')>.txt"
- Create an empty file in
-
Start the server (example):
- Routing:
router.route("/public/*").handler(StaticHandler.create("public").setDirectoryListing(true)); - Server:
vertx.createHttpServer().requestHandler(router).listen(8890);
- Routing:
-
Verification request (raw HTTP):
GET /public/ HTTP/1.1 Host: 127.0.0.1:8890 Accept: text/html Connection: close -
Example response excerpt:
<ul id="files"> <li> <a href="/public/<img src=x onerror=alert('XSS')>.txt" title="<img src=x onerror=alert('XSS')>.txt"> <img src=x onerror=alert('XSS')>.txt </a> </li> ... </ul>
- When accessing
/public/in a browser, the unescaped file name is interpreted as HTML, and event handlers such asonerrorare executed.
Potential Impact
-
Stored XSS
- Arbitrary JavaScript executes in the browser context of users viewing the listing page
- Possible consequences:
- Theft of session tokens, JWTs, localStorage contents, or CSRF tokens
- Unauthorized actions with admin privileges (user creation, permission changes, settings modifications)
- Watering hole attacks, including malware distribution or malicious script injection to other pages
-
Common Conditions That Make Exploitation Easier
- Uploaded files are served directly under a publicly accessible directory
- Shared/synced directories (e.g., NFS, SMB, WebDAV, or cloud sync) are exposed
- ZIP/TAR archives are extracted directly under the webroot and directory listing is enabled in production environments
Similar CVEs Previously Reported
- CVE‑2024‑32966
- CVE‑2019‑15603
NVD (es)
En las versiones de Eclipse Vert.x [4.0.0, 4.5.21] y [5.0.0, 5.0.4], cuando el 'listado de directorios' está habilitado, los nombres de archivos y directorios se insertan en el HTML generado sin el escape adecuado en los atributos href, title y link. Un atacante que puede crear o renombrar archivos o directorios dentro de una ruta servida puede elaborar nombres de archivo que contengan scripts maliciosos o contenido HTML, lo que lleva a un cross-site scripting (XSS) almacenado que se ejecuta en el contexto de los usuarios que ven el listado de directorios afectado.
References
| https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/303 | exploit, issue-tracking, vendor-advisory, web | |
| https://github.com/vert-x3/vertx-web/security/advisories/GHSA-45p5-v273-3qqr | web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-11966 | advisory | |
| https://github.com/vert-x3/vertx-web | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-11966 changed 2025-10-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-45p5-v273-3qqr changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-11966 changed 2026-10-08 | Public domain |