Vulnerabilities in pkg:npm/webpack-dev-middleware
PACKAGECVE-2026-76844 is a HIGH (CVSS 7.4) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Webpack dev middleware libraries in the npm ecosystem. The issue involves webpack-dev-middleware vulnerable to path traversal via non-slash-terminated publicpath. Remediation is available by upgrading affected packages to version 8.3.0, 7.4.6.
pkg:npm/webpack-dev-middleware
Vulnerability advisories affecting package pkg:npm/webpack-dev-middleware. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-g84c-rxfj-3j2c | CVE-2026-76844 | HIGH | webpack-dev-middleware vulnerable to Path Traversal via non-slash-terminated publicPath |
| GHSA-p3f5-w63m-mxph | - | HIGH | Duplicate Advisory: webpack-dev-middleware vulnerable to Path Traversal via non-slash-terminated publicPath |
| GHSA-wr3j-pwj9-hqq6 | CVE-2024-29180 | HIGH | Path traversal in webpack-dev-middleware |
CVE-2026-76844 at a Glance
Security Impact
CVSS: 7.4
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:R/S:C/C:H/I:N/A:N).
How to Fix CVE-2026-76844
To remediate this vulnerability, upgrade all affected Webpack dev middleware 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-middleware@8.3.0
npm install webpack-dev-middleware@7.4.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls webpack-dev-middleware
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-76844, inspect your project dependencies using npm:
npm ls webpack-dev-middleware
Analyze the terminal output to locate any version of Webpack dev middleware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.3.0), your application is affected.
Note: The npm ls webpack-dev-middleware 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-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 Webpack dev middleware, 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-2026-76844 Affected Webpack dev middleware Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
webpack-dev-middleware
|
npm |
≥ 8.0.0
< 8.3.0
|
8.3.0
|
|
webpack-dev-middleware
|
npm |
< 7.4.6
|
7.4.6
|
References
Frequently Asked Questions
What is CVE-2026-76844?
Which Webpack dev middleware versions are affected?
What version fixes CVE-2026-76844?
Is webpack-dev-middleware affected?
What is the CVSS score of CVE-2026-76844?
What CWE is associated with CVE-2026-76844?
How can I check npm dependencies for CVE-2026-76844?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g84c-rxfj-3j2c",
"modified" : "2026-09-29T16:59:18Z",
"published" : "2026-09-29T16:59:18Z",
"aliases" : [ "CVE-2026-76844" ],
"summary" : "webpack-dev-middleware vulnerable to Path Traversal via non-slash-terminated publicPath",
"details" : "> [!IMPORTANT]\n> CVE-2026-76844 was assigned and published for this issue by VulnCheck on 2026-08-24 without prior coordination with the webpack maintainers or the OpenJS Foundation, which holds the CVE Numbering Authority scope for webpack projects. Neither the maintainers nor the OpenJS CNA were notified before publication, and no fix was available at that time. This advisory is the coordinated record produced by the webpack maintainers and the OpenJS Foundation CNA.\n\n### Impact\n\n`webpack-dev-middleware` resolves a request to a local file in `getFilenameFromUrl`. When the configured `publicPath` has no trailing slash (for example `/assets`), a request that shares that prefix without being under it (for example `/assets../secret`) still passes the containment check, and the `..` guard does not catch it because it runs on the path before the `publicPath` prefix is stripped. The stripped remainder then escapes the configured output directory once joined, so an unauthenticated request can read files outside the output root. Applications serving `webpack-dev-middleware` (directly or via `webpack-dev-server`) with a `publicPath` that does not end in a slash are affected. A development server reachable on the network can be attacked with a single request and no victim interaction.\n\n### Patches\n\nPatched in `webpack-dev-middleware` 8.3.0. There is no backport to the 5.x, 6.x, or 7.x lines; users on those lines should upgrade to 8.3.0 or later.\n\n### Workarounds\n\nConfigure `publicPath` with a trailing slash (for example `/assets/` instead of `/assets`), or upgrade to a patched version.\n\n### References\n\n- [CVE-2024-29180](https://www.cve.org/CVERecord?id=CVE-2024-29180) ([GHSA-wr3j-pwj9-hqq6](https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6)), the earlier path traversal in the same component that this issue bypasses.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "webpack-dev-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.3.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "webpack-dev-middleware"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.4.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 7.4.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-g84c-rxfj-3j2c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-76844"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-middleware/pull/2404"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-middleware/commit/13344e78b26d88fe9b7c8381a3860e248a52359b"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-middleware/commit/cefccbac330c29052fc6dffe85fd292ea2ac782b"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-wr3j-pwj9-hqq6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/webpack/webpack-dev-middleware"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-middleware/blob/v8.1.1/src/middleware.js"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-middleware/releases/tag/v7.4.6"
}, {
"type" : "WEB",
"url" : "https://github.com/webpack/webpack-dev-middleware/releases/tag/v8.3.0"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/webpack-dev-middleware-path-traversal-via-offset-slice-on-a-non-slash-terminated-publicpath"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-29T16:59:18Z",
"nvd_published_at" : null
}
}