CVE-2018-12541: Vertx core Excessive Memory Allocation Vulnerability
MODERATECVE-2018-12541 is a MODERATE (CVSS 6.5) excessive memory allocation vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Vertx core libraries in the Maven ecosystem. The issue involves excessive memory allocation. Remediation is available by upgrading affected packages to version 3.5.4.
CVE-2018-12541 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2018-12541
To remediate this vulnerability, upgrade all affected Vertx core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>3.5.4</version>
</dependency>
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-12541, 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 core 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-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Vertx core, 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
CVE-2018-12541 Affected Vertx core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.vertx:vertx-core
|
Maven |
≥ 3.0.0
< 3.5.4
|
3.5.4
|
References
Frequently Asked Questions
What is CVE-2018-12541?
Which Vertx core versions are affected?
What version fixes CVE-2018-12541?
Is vertx-core affected?
What is the CVSS score of CVE-2018-12541?
What CWE is associated with CVE-2018-12541?
How can I check Maven dependencies for CVE-2018-12541?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-45xm-v8gq-7jqx",
"modified" : "2022-04-25T20:23:45Z",
"published" : "2018-10-17T16:19:59Z",
"aliases" : [ "CVE-2018-12541" ],
"summary" : "Excessive memory allocation",
"details" : "In version from 3.0.0 to 3.5.3 of Eclipse Vert.x, the WebSocket HTTP upgrade implementation buffers the full http request before doing the handshake, holding the entire request body in memory. There should be a reasonnable limit (8192 bytes) above which the WebSocket gets an HTTP response with the 413 status code and the connection gets closed.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.vertx:vertx-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.5.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-12541"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-vertx/vert.x/issues/2648"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-vertx/vert.x/commit/269a583330695d1418a4f5578f7169350b2e1332"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/reb3cc4f3e10264896a541813c0030ec9d9466ba9b722fe5d4adc91cd@%3Cissues.bookkeeper.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/re5ddabee26fbcadc7254d03a5a073d64080a9389adc9e452529664ed@%3Ccommits.pulsar.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rbdc279ecdb7ac496a03befb05a53605c4ce2b67e14f8f4df4cfa1203@%3Cissues.bookkeeper.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r98dc06e2b1c498d0e9eb5038d8e1aefd24e411e50522e7082dd9e0b7@%3Ccommits.bookkeeper.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r8db0431ecf93f2dd2128db5ddca897b33ba883b7f126648d6a9e4c47@%3Ccommits.pulsar.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r79789a0afb184abd13a2c07016e6e7ab8e64331f332b630bf82a2eed@%3Ccommits.pulsar.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r3da899890536af744dec897fbc561fd9810ac45e79a16164b53c31b2@%3Ccommits.pulsar.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r362835e6c7f34324ed24e318b363fcdd20cea91d0cea0b2e1164f73e@%3Cissues.bookkeeper.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r344235b1aea2f7fa2381495df1d77d02b595e3d7e4626e701f7c1062@%3Ccommits.pulsar.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r1af71105539fe01fcecb92d2ecd8eea56c515fb1c80ecab4df424553@%3Cissues.bookkeeper.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r11789cd6d67ecca2d6f6bbb11e34495e68ee99287b6c59edf5b1a09c@%3Ccommits.pulsar.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r01123837ffbfdf5809e0a4ac354ad546e4ca8f18df89ee5a10eeb81b@%3Cissues.bookkeeper.apache.org%3E"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/eclipse-vertx/vert.x"
}, {
"type" : "WEB",
"url" : "https://bugs.eclipse.org/bugs/show_bug.cgi?id=539170"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:2946"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119", "CWE-789" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:57:32Z",
"nvd_published_at" : "2018-10-10T20:29:00Z"
}
}