CVE-2026-76844 · HIGH (CVSS 7.4)
Summary: webpack-dev-middleware before 7.4.6 and 8.3.0 Path Traversal via Non-Slash-Terminated publicPath
Details
webpack-dev-middleware 5.3.4, 6.1.2 through 6.1.3, 7.1.0 before 7.4.6, and 8.0.0 before 8.3.0 contains a path traversal vulnerability in getFilenameFromUrl that bypasses the fix for CVE-2024-29180: a publicPath without a trailing slash is matched by string prefix, and the '..' guard runs before that prefix is stripped. Unauthenticated attackers can request a path such as /assets../secret to read files one directory above the output directory when the middleware serves from the physical filesystem through writeToDisk or a custom outputFileSystem.
Severity
HIGH (CVSS 7.4) — vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
Affected packages
- npm webpack-dev-middleware [8.0.0 – 8.3.0]
- npm webpack-dev-middleware [0 – 7.4.6]
- GIT github.com/webpack/webpack-dev-middleware [54e4a9604905898066979a3a918d3d545f761447 – 4537522597563c5fbe613ee17f91c7e02070c102] [3d94e45ac602a6f7a904ea5eba2086d7e38240dd – 70b3c336203f79d01eb3bde1a08fe5bb0a773931] [07acf80fe1766a199d2f7268a26f356732effc34 – 1abbf0898f1ca6cb1f8cc42b7469c7c0c45a5787] [86071ead69e946ada25497d3e281923e885229a4 – 13344e78b26d88fe9b7c8381a3860e248a52359b]
References
- https://www.npmjs.com/package/webpack-dev-middleware
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76844.json
- https://github.com/advisories/GHSA-wr3j-pwj9-hqq6
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v7.4.6
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v8.3.0
- https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-g84c-rxfj-3j2c
- https://nvd.nist.gov/vuln/detail/CVE-2026-76844
- https://www.vulncheck.com/advisories/webpack-dev-middleware-path-traversal-via-offset-slice-on-a-non-slash-terminated-publicpath
- https://github.com/webpack/webpack-dev-middleware/commit/13344e78b26d88fe9b7c8381a3860e248a52359b
- https://github.com/webpack/webpack-dev-middleware/commit/cefccbac330c29052fc6dffe85fd292ea2ac782b
- https://github.com/webpack/webpack-dev-middleware
- https://github.com/webpack/webpack-dev-middleware/blob/v8.1.1/src/middleware.js