webpack-dev-middleware before 7.4.6 and 8.3.0 Path Traversal via Non-Slash-Terminated publicPath (webpack webpack-dev-middleware)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.76 % · percentile 57 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- VulnCheck
- Affected products
- webpack · webpack-dev-middleware
- NVD status
- Deferred
Description
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.
Weaknesses (CWE)
- CWE-22 — Improper Limitation of a Pathname to a Restricted Directory
Credits
- Muhammad Sobirov finder
References
- https://github.com/webpack/webpack-dev-middleware
- https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-g84c-rxfj-3j2c
- 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/releases/tag/v8.3.0
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v7.4.6
- https://github.com/webpack/webpack-dev-middleware/blob/v8.1.1/src/middleware.js
- https://github.com/advisories/GHSA-wr3j-pwj9-hqq6
- https://www.vulncheck.com/advisories/webpack-dev-middleware-path-traversal-via-offset-slice-on-a-non-slash-terminated-publicpath
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 4.0 | HIGH 8.3 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N | VulnCheck |
| CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N | VulnCheck |
| CVSS 4.0 | HIGH 8.3 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD · disclosure@vulncheck.com (Secondary) |
| CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N | NVD · disclosure@vulncheck.com (Primary) |
Advisories
- GHSA-g84c-rxfj-3j2c — webpack-dev-middleware vulnerable to Path Traversal via non-slash-terminated publicPath
European references
- ENISA EUVD · EUVD-2026-64850
- GCVE · GCVE-0-2026-76844
CERT-FR advisories
- CERTFR-2026-AVI-1472 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
Affected products
| Product | Affected versions |
|---|---|
webpack · webpack-dev-middlewarewebpack-dev-middleware | affected : ≥ 5.3.4 ≤ 5.3.4 affected : ≥ 6.1.2 ≤ 6.1.3 affected : ≥ 7.1.0 < 7.4.6 unaffected : 7.4.6 affected : ≥ 8.0.0 < 8.3.0 unaffected : 8.3.0 Other versions : unaffected |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |