webpack-dev-middleware vulnerable to Path Traversal via non-slash-terminated publicPathGHSA-g84c-rxfj-3j2c
HIGHFix: webpack/webpack-dev-middleware#2404GHSA-g84c-rxfj-3j2c is a high-severity (CVSS 7.4) Out-of-bounds Write vulnerability in webpack-dev-middleware. A fix is available for webpack-dev-middleware — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-g84c-rxfj-3j2c.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-g84c-rxfj-3j2c by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
webpack-dev-middlewarenpmDescription
[!IMPORTANT] 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.
Impact
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.
Patches
Patched 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.
Workarounds
Configure publicPath with a trailing slash (for example /assets/ instead of /assets), or upgrade to a patched version.
References
- CVE-2024-29180 (GHSA-wr3j-pwj9-hqq6), the earlier path traversal in the same component that this issue bypasses.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | webpack-dev-middleware | ≥ 8.0.0&&< 8.3.0 | 8.3.0npm install webpack-dev-middleware@8.3.0 |
| 📦npm | webpack-dev-middleware | all versions | 7.4.6npm install webpack-dev-middleware@7.4.6 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for webpack-dev-middleware, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update webpack-dev-middleware to 8.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-g84c-rxfj-3j2c is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A path traversal flaw exists in webpack-dev-middleware when resolving URLs using a publicPath configuration lacking a trailing slash. By supplying a crafted URL with improper dot-dot positioning within a segment, an attacker can bypass the path traversal validation guard and offset calculation. When backed by a…
Ensure that the configured publicPath always ends with a trailing slash (e.g., '/assets/'), or utilize the default setting ('auto'), which resolves to '/' and is unmitigated by default. Alternatively, avoid backing the middleware with a physical filesystem (writeToDisk: false).Source: Red Hat security advisory for GHSA-g84c-rxfj-3j2c (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Data Grid 8.6.3 | redhat-datagrid-maven-repository.zip | RHSA-2026:69296 |
| Red Hat Discovery 2 | discovery/discovery-ui-rhel9:1788206196 | RHSA-2026:61783 |
| Red Hat Migration Toolkit 1.8 | rhmtc/openshift-migration-ui-rhel8:1789546373 | RHSA-2026:68681 |
Frequently Asked Questions
Is GHSA-g84c-rxfj-3j2c in your dependencies?
Find it across npm, including transitive dependencies.