CVE-2026-76844webpack-dev-middleware before 7.4.6 and 8.3.0 Path Traversal via Non-Slash-Terminated…
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.
What to do
Fixed builds are available from npm: see the table below for the fixed version per release.
Red Hat has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Red Hat Enterprise Linux 10 | cockpit-ha-cluster | Not affected | ||
| Red Hat Enterprise Linux 10 | grafana | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | grafana-selinux | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | pcs | Not affected | ||
| Red Hat Enterprise Linux 10 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60 | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs-snmp | Not affected | ||
| npm library | webpack-dev-middleware | Fixed | 5.3.4 | GHSA-g84c-rxfj-3j2c |
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- webpack-dev-middleware: affected: 5.3.4 to 5.3.4, 6.1.2 to 6.1.3, 7.1.0 to before 7.4.6, 7.4.6 not affected, 8.0.0 to before 8.3.0, 8.3.0 not affected; fixed in
7.4.6,8.3.0
Vendor advisories:
- https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-g84c-rxfj-3j2c (vendor-advisory)
- https://github.com/webpack/webpack-dev-middleware/commit/13344e78b26d88fe9b7c8381a3860e24… (patch)
- https://github.com/webpack/webpack-dev-middleware/commit/cefccbac330c29052fc6dffe85fd292e… (patch)
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v8.3.0 (release-notes)
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v7.4.6 (release-notes)
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.