CVE-2018-14732: Webpack dev server Missing Origin Validation Vulnerability
HIGHCVE-2018-14732 is a HIGH (CVSS 7.5) missing origin validation vulnerability (CWE-20: Improper Input Validation) affecting Webpack dev server libraries in the npm ecosystem. The issue involves missing origin validation in webpack-dev-server. Remediation is available by upgrading affected packages to version 3.1.11.
CVE-2018-14732 at a Glance
Security Impact
CVSS: 7.5
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:N/A:N).
How to Fix CVE-2018-14732
To remediate this vulnerability, upgrade all affected Webpack dev server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install webpack-dev-server@3.1.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls webpack-dev-server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2018-14732, inspect your project dependencies using npm:
npm ls webpack-dev-server
Analyze the terminal output to locate any version of Webpack dev server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.11), your application is affected.
Note: The npm ls webpack-dev-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Webpack dev server, 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-14732 Affected Webpack dev server Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
webpack-dev-server
|
npm |
< 3.1.11
|
3.1.11
|
References
Frequently Asked Questions
What is CVE-2018-14732?
Which Webpack dev server versions are affected?
What version fixes CVE-2018-14732?
Is webpack-dev-server affected?
What is the CVSS score of CVE-2018-14732?
What CWE is associated with CVE-2018-14732?
How can I check npm dependencies for CVE-2018-14732?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cf66-xwfp-gvc4",
"modified" : "2022-04-06T20:39:38Z",
"published" : "2019-01-04T17:40:59Z",
"aliases" : [ "CVE-2018-14732" ],
"summary" : "Missing Origin Validation in webpack-dev-server",
"details" : "Versions of `webpack-dev-server` before 3.1.10 are missing origin validation on the websocket server. This vulnerability allows a remote attacker to steal a developer's source code because the origin of requests to the websocket server that is used for Hot Module Replacement (HMR) are not validated.\n\n\n## Recommendation\nFor `webpack-dev-server` update to version 3.1.11 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "webpack-dev-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.11"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-14732"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-server/issues/1445"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-server/issues/1620"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-server/commit/f18e5adf123221a1015be63e1ca2491ca45b8d10"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/webpack/webpack-dev-server"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md#3111-2018-12-21"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/725"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:31:15Z",
"nvd_published_at" : null
}
}