CVE-2018-12542: Vertx web Eclipse Vert.x Does Not Properly Vulnerability

CRITICAL
Advisory Identifier: GHSA-h39x-m55c-v55h
CVSS 9.8
CWE-22
Published
Advisory Summary

CVE-2018-12542 is a CRITICAL (CVSS 9.8) eclipse vert.x does not properly vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Vertx web libraries in the Maven ecosystem. The issue involves eclipse vert.x does not properly neutralize '' (forward slashes) sequences that can resolve to an external location. Remediation is available by upgrading affected packages to version 3.5.4.

CVE-2018-12542 at a Glance

CVE Identifier CVE-2018-12542
GHSA Identifier GHSA-h39x-m55c-v55h
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Vertx web
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2018-12542

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: 3.5.4
<dependency>
    <groupId>io.vertx</groupId>
    <artifactId>vertx-web</artifactId>
    <version>3.5.4</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-2018-12542, 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 3.5.4), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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

In version from 3.0.0 to 3.5.3 of Eclipse Vert.x, the StaticHandler uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\' (forward slashes) sequences that can resolve to a location that is outside of that directory when running on Windows Operating Systems.

CVE-2018-12542 Affected Vertx web Versions

1 component(s)
Fixed Versions:
3.5.4
Product / Package Ecosystem Affected Versions Fixed Version
io.vertx:vertx-web
Maven
≥ 3.0.0
< 3.5.4
3.5.4

References

Frequently Asked Questions

What is CVE-2018-12542?
CVE-2018-12542 is a security vulnerability in Vertx web involving Eclipse Vert.x does not properly neutralize '' (forward slashes) sequences that can resolve to an external location under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Vertx web versions are affected?
Affected versions include releases prior to 3.5.4 across affected packages: io.vertx:vertx-web.
What version fixes CVE-2018-12542?
Upgrading to 3.5.4 (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 3.5.4. Upgrade your dependency to 3.5.4 or later.
What is the CVSS score of CVE-2018-12542?
CVE-2018-12542 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-12542?
CVE-2018-12542 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Maven dependencies for CVE-2018-12542?
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-h39x-m55c-v55h",
  "modified" : "2022-04-26T21:49:59Z",
  "published" : "2018-10-17T16:20:45Z",
  "aliases" : [ "CVE-2018-12542" ],
  "summary" : "Eclipse Vert.x does not properly neutralize '' (forward slashes) sequences that can resolve to an external location",
  "details" : "In version from 3.0.0 to 3.5.3 of Eclipse Vert.x, the StaticHandler uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\\' (forward slashes) sequences that can resolve to a location that is outside of that directory when running on Windows Operating Systems.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "io.vertx:vertx-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.5.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-12542"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vert-x3/vertx-web/issues/1025"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vert-x3/vertx-web/commit/57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.eclipse.org/bugs/show_bug.cgi?id=539171"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-h39x-m55c-v55h"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vert-x3/vertx-web"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:38:32Z",
    "nvd_published_at" : null
  }
}