CVE-2023-28154: Webpack Cross-realm Object Access Vulnerability
CRITICALCVE-2023-28154 is a CRITICAL (CVSS 9.8) cross-realm object access vulnerability (General Security Weakness) affecting Webpack libraries in the npm ecosystem. The issue involves cross-realm object access in webpack 5. Remediation is available by upgrading affected packages to version 5.76.0.
CVE-2023-28154 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-28154
To remediate this vulnerability, upgrade all affected Webpack 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@5.76.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls webpack
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-28154, inspect your project dependencies using npm:
npm ls webpack
Analyze the terminal output to locate any version of Webpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.76.0), your application is affected.
Note: The npm ls webpack 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 General Security Weakness. In Webpack, 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-2023-28154 Affected Webpack Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
webpack
|
npm |
≥ 5.0.0
< 5.76.0
|
5.76.0
|
References
Frequently Asked Questions
What is CVE-2023-28154?
Which Webpack versions are affected?
What version fixes CVE-2023-28154?
Is webpack affected?
What is the CVSS score of CVE-2023-28154?
What CWE is associated with CVE-2023-28154?
How can I check npm dependencies for CVE-2023-28154?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hc6q-2mpp-qw7j",
"modified" : "2023-10-30T13:11:24Z",
"published" : "2023-03-13T03:30:15Z",
"aliases" : [ "CVE-2023-28154" ],
"summary" : "Cross-realm object access in Webpack 5",
"details" : "Webpack 5 before 5.76.0 does not avoid cross-realm object access. ImportParserPlugin.js mishandles the magic comment feature. An attacker who controls a property of an untrusted object can obtain access to the real global object.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "webpack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.76.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-28154"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack/pull/16500"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AU7BOXTBK3KDYSWH67ASZ22TUIOZ3X5G"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PPSAXUTXBCCTAHTCX5BUR4YVP25XALQ3"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U2AFCM6FFE3LRYI6KNEQWKMXMQOBZQ2D"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-14T15:03:08Z",
"nvd_published_at" : "2023-03-13T01:15:00Z"
}
}