Vulnerabilities in pkg:maven/io.vertx/vertx-web

PACKAGE
Advisory Identifier: GHSA-45p5-v273-3qqr
Advisory Summary

CVE-2025-11966 is a LOW (CVSS 4.9) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Vertx web libraries in the Maven ecosystem. The issue involves vert.x-web vulnerable to stored cross-site scripting in directory listings via file names. Remediation is available by upgrading affected packages to version 4.5.22, 5.0.5.

7 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/io.vertx/vertx-web

7 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/io.vertx/vertx-web. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-45p5-v273-3qqr CVE-2025-11966 LOW Vert.x-Web vulnerable to Stored Cross-site Scripting in directory listings via file names
GHSA-h5fg-jpgr-rv9c CVE-2025-11965 MODERATE Vert.x-Web Access Control Flaw in StaticHandler’s Hidden File Protection for Files Under Hidden Directories
GHSA-rvgg-f8qm-6h7j CVE-2018-12540 HIGH High severity vulnerability that affects io.vertx:vertx-web
GHSA-53jx-vvf9-4x38 CVE-2023-24815 MODERATE StaticHandler disclosure of classpath resources on Windows when mounted on a wildcard route
GHSA-h39x-m55c-v55h CVE-2018-12542 CRITICAL Eclipse Vert.x does not properly neutralize '' (forward slashes) sequences that can resolve to an external location
GHSA-vjw7-6gfq-6wf5 CVE-2019-17640 CRITICAL Path Traversal in Eclipse Vert
GHSA-9q69-g5gc-9fgf CVE-2020-35217 HIGH Cross-Site Request Forgery in Vert.x-Web framework

CVE-2025-11966 at a Glance

CVE Identifier CVE-2025-11966
GHSA Identifier GHSA-45p5-v273-3qqr
Severity LOW
CVSS v3.1 Base Score 4.9
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Vertx web
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-11966

To remediate this vulnerability, upgrade all affected Vertx web dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

io.vertx:vertx-web fixed: 4.5.22
<dependency>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-web</artifactId>
    <version>4.5.22</version>
</dependency>
io.vertx:vertx-web fixed: 5.0.5
<dependency>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-web</artifactId>
    <version>5.0.5</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=io.vertx

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-11966, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=io.vertx

Analyze the terminal output to locate any version of Vertx web in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.22), your application is affected.

Note: The mvn dependency:tree -Dincludes=io.vertx command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Vertx web, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Description - In the `StaticHandlerImpl#sendDirectoryListing(...)` method under the `text/html` branch, file and directory names are directly embedded into the `href`, `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: `normalizedDir` is 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 # Reproduction Steps 1. 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) 2. 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: ```bash mkdir -p public printf 'test' > "public/<img src=x onerror=alert('XSS')>.txt" ``` 3. Start the server (example): - Routing: `router.route("/public/*").handler(StaticHandler.create("public").setDirectoryListing(true));` - Server: `vertx.createHttpServer().requestHandler(router).listen(8890);` 4. Verification request (raw HTTP): ``` GET /public/ HTTP/1.1 Host: 127.0.0.1:8890 Accept: text/html Connection: close ``` 5. Example response excerpt: ```html <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 as `onerror` are 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

CVE-2025-11966 Affected Vertx web Versions

2 component(s)
Fixed Versions:
4.5.225.0.5
Product / Package Ecosystem Affected Versions Fixed Version
io.vertx:vertx-web
Maven
< 4.5.22
4.5.22
io.vertx:vertx-web
Maven
≥ 5.0.0
< 5.0.5
5.0.5

References

Frequently Asked Questions

What is CVE-2025-11966?
CVE-2025-11966 is a security vulnerability in Vertx web involving Vert.x-Web vulnerable to Stored Cross-site Scripting in directory listings via file names under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Vertx web versions are affected?
Affected versions include releases prior to 4.5.22, 5.0.5 across affected packages: io.vertx:vertx-web.
What version fixes CVE-2025-11966?
Upgrading to 4.5.22, 5.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vertx-web affected?
Yes, io.vertx:vertx-web is affected in releases prior to 4.5.22, 5.0.5. Upgrade your dependency to 4.5.22, 5.0.5 or later.
What is the CVSS score of CVE-2025-11966?
CVE-2025-11966 has a CVSS v3.1 base score of 4.9 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2025-11966?
CVE-2025-11966 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Maven dependencies for CVE-2025-11966?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=io.vertx'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-45p5-v273-3qqr",
  "modified" : "2026-01-21T16:37:06Z",
  "published" : "2025-10-22T19:38:11Z",
  "aliases" : [ "CVE-2025-11966" ],
  "summary" : "Vert.x-Web vulnerable to Stored Cross-site Scripting in directory listings via file names",
  "details" : "# Description\n\n- In the `StaticHandlerImpl#sendDirectoryListing(...)` method under the `text/html` branch, file and directory names are directly embedded into the `href`, `title`, and link text without proper HTML escaping.\n- 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.\n- Affected Code:\n    - File: `vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java`\n    - Lines:\n        - 709–713: `normalizedDir` is constructed without escaping\n        - 714–731: `<li><a ...>` elements insert file names directly into attributes and body without escaping\n        - 744: parent directory name construction\n        - 746–751: `{directory}`, `{parent}`, and `{files}` are inserted into the HTML template without escaping\n\n# Reproduction Steps\n\n1. Prerequisites:\n    - Directory listing is enabled using `StaticHandler`  \n      (e.g., `StaticHandler.create(\"public\").setDirectoryListing(true)`)\n    - The attacker has the ability to create arbitrary file names under a public directory (e.g., via upload functionality or a shared directory)\n\n2. Create a malicious file name (example for Unix-based OS):\n    - Create an empty file in `public/` with one of the following names:\n      - `<img src=x onerror=alert('XSS')>.txt`\n      - Or attribute injection: `evil\" onmouseover=\"alert('XSS')\".txt`\n    - Example:\n      ```bash\n      mkdir -p public\n      printf 'test' > \"public/<img src=x onerror=alert('XSS')>.txt\"\n      ```\n\n3. Start the server (example):\n    - Routing: `router.route(\"/public/*\").handler(StaticHandler.create(\"public\").setDirectoryListing(true));`\n    - Server: `vertx.createHttpServer().requestHandler(router).listen(8890);`\n\n4. Verification request (raw HTTP):\n    ```\n    GET /public/ HTTP/1.1\n    Host: 127.0.0.1:8890\n    Accept: text/html\n    Connection: close\n    ```\n\n5. Example response excerpt:\n    ```html\n    <ul id=\"files\">\n      <li>\n        <a href=\"/public/<img src=x onerror=alert('XSS')>.txt\"\n           title=\"<img src=x onerror=alert('XSS')>.txt\">\n           <img src=x onerror=alert('XSS')>.txt\n        </a>\n      </li>\n      ...\n    </ul>\n    ```\n\n- When accessing `/public/` in a browser, the unescaped file name is interpreted as HTML, and event handlers such as `onerror` are executed.\n\n# Potential Impact\n\n- **Stored XSS**\n    - Arbitrary JavaScript executes in the browser context of users viewing the listing page\n    - Possible consequences:\n        - Theft of session tokens, JWTs, localStorage contents, or CSRF tokens\n        - Unauthorized actions with admin privileges (user creation, permission changes, settings modifications)\n        - Watering hole attacks, including malware distribution or malicious script injection to other pages\n\n- **Common Conditions That Make Exploitation Easier**\n    - Uploaded files are served directly under a publicly accessible directory\n    - Shared/synced directories (e.g., NFS, SMB, WebDAV, or cloud sync) are exposed\n    - ZIP/TAR archives are extracted directly under the webroot and directory listing is enabled in production environments\n\n# Similar CVEs Previously Reported\n\n- CVE‑2024‑32966  \n- CVE‑2019‑15603",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.vertx:vertx-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.vertx:vertx-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.0.4"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vert-x3/vertx-web/security/advisories/GHSA-45p5-v273-3qqr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-11966"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vert-x3/vertx-web"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/303"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-22T19:38:11Z",
    "nvd_published_at" : "2025-10-22T15:15:31Z"
  }
}