CVE-2024-29180 json
webpack-dev-middleware Path Traversal vulnerability
published 2024-03-21 2 y ago modified 2026-10-03 37 d ago also GHSA-wr3j-pwj9-hqq6 , EUVD-2024-1028
- cvss
- 7.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 69%
- public exploits
- 0
- none known
Summary
Prior to versions 7.1.0, 6.1.2, and 5.3.4, the webpack-dev-middleware development middleware for devpack does not validate the supplied URL address sufficiently before returning the local file. It is possible to access any file on the developer's machine. The middleware can either work with the physical filesystem when reading the files or it can use a virtualized in-memory `memfs` filesystem. If `writeToDisk` configuration option is set to `true`, the physical filesystem is used. The `getFilenameFromUrl` method is used to parse URL and build the local file path. The public path prefix is stripped from the URL, and the `unsecaped` path suffix is appended to the `outputPath`. As the URL is not unescaped and normalized automatically before calling the midlleware, it is possible to use `%2e` and `%2f` sequences to perform path traversal attack.
Developers using `webpack-dev-server` or `webpack-dev-middleware` are affected by the issue. When the project is started, an attacker might access any file on the developer's machine and exfiltrate the content. If the development server is listening on a public IP address (or `0.0.0.0`), an attacker on the local network can access the local files without any interaction from the victim (direct connection to the port). If the server allows access from third-party domains, an attacker can send a malicious link to the victim. When visited, the client side script can connect to the local server and exfiltrate the local files. Starting with fixed versions 7.1.0, 6.1.2, and 5.3.4, the URL is unescaped and normalized before any further processing.
Patch / fix
- npm webpack-dev-middleware 5.3.4, 6.1.2, 7.1.0
- webpack.js webpack-dev-middleware 5.3.4, 6.1.2, 7.1.0
- github.com/webpack/webpack-dev-middleware@189c4ac commit
- github.com/webpack/webpack-dev-middleware@9670b34 commit
- github.com/webpack/webpack-dev-middleware@e10008c commit
- github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f… patch
- github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f… patch
- github.com/webpack/webpack-dev-middleware/releases/tag/v5.3.4 release
- github.com/webpack/webpack-dev-middleware/releases/tag/v6.1.2 release
- github.com/webpack/webpack-dev-middleware/releases/tag/v7.1.0 release
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-29180 updated cvss 7.4
webpack-dev-middleware: lack of URL validation may lead to file leak
-
Red Hat Migration Toolkit for Virtualization migration-toolkit-virtualization/mtv-console-plugin-rhel9affected: workaround, no fix available
-
Red Hat Node HealthCheck Operator workload-availability/node-remediation-console-rhel8affected: workaround, no fix planned “Will not fix”
-
Red Hat OpenShift Serverless devspaces/code-rhel9affected: workaround, no fix available
-
Red Hat 3scale API Management Platform 2 3scale-amp2/system-rhel7affected: workaround, no fix planned “Will not fix”
-
Red Hat Advanced Cluster Security 3 advanced-cluster-security/rhacs-main-rhel8affected: workaround, no fix planned “Out of support scope”
-
Red Hat build of OptaPlanner 8 devspaces/code-rhel9 Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9affected: workaround, no fix planned “Will not fix”
-
Red Hat Enterprise Linux 6 firefox, thunderbirdaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Integration Camel K 1 devspaces/code-rhel9 Red Hat OpenShift Container Platform 4 openshift4/ose-consoleaffected: workaround, no fix planned “Will not fix”
show 22 moreshow fewer
-
Red Hat OpenShift Dev Spaces devspaces/traefik-rhel8affected: workaround, no fix available
-
Red Hat Process Automation 7 devspaces/code-rhel9affected: workaround, no fix planned “Will not fix”
-
Red Hat Quay 3 quay/quay-rhel8affected: workaround, no fix available
-
Red Hat Migration Toolkit for Runtimes 1 on RHEL 8fixed: vendor fix RHSA-2024:3920
-
Red Hat MTA 6.2 for RHEL 8 mta/mta-ui-rhel9 6.2.3-2, mta/mta-windup-addon-rhel9 6.2.3-2fixed: vendor fix RHSA-2024:3989
-
Red Hat MTA 7.0 for RHEL 9 mta/mta-ui-rhel9 7.0.3-13, mta/mta-cli-rhel9 7.0.3-16fixed: vendor fix RHSA-2024:3316
-
Red Hat NETOBSERV 1.6 for RHEL 9 network-observability/network-observability-cli-rhel9 v1.6.0-66, network-observability/network-observability-operator-bundle 1.6.0-78, network-observability/network-observability-rhel9-operator v1.6.0-66, network-observability/network-observability-ebpf-agent-rhel9 v1.6.0-66, network-observability/network-observability-console-plugin-rhel9 v1.6.0-66, network-observability/network-observability-flowlogs-pipeline-rhel9 v1.6.0-66fixed: vendor fix RHSA-2024:3868
-
Red Hat OpenShift Pipelines version 1.16 for RHEL 8 openshift-pipelines/pipelines-nop-rhel8 v1.16.0-7, openshift-pipelines/pipelines-events-rhel8 v1.16.0-7, openshift-pipelines/pipelines-hub-ui-rhel8 v1.16.0-3, openshift-pipelines/pipelines-cli-tkn-rhel8 v1.16.0-7, openshift-pipelines/pipelines-hub-api-rhel8 v1.16.0-3, openshift-pipelines/pipelines-webhook-rhel8 v1.16.0-7, +22 morefixed: vendor fix RHEA-2024:7870
-
Red Hat build of Apicurio Registry 2.6.1 GAfixed: vendor fix RHSA-2024:4873
-
Red Hat Data Gridfixed: vendor fix RHSA-2024:4460
-
Red Hat Discovery 2 discovery/discovery-ui-rhel9 1788206196fixed: vendor fix RHSA-2026:61783
-
Red Hat Migration Toolkit 1.7 rhmtc/openshift-migration-ui-rhel8 v1.7.16-6fixed: vendor fix RHSA-2024:4520
-
Red Hat Migration Toolkit 1.8 rhmtc/openshift-migration-controller-rhel8 v1.8.4-22fixed: vendor fix RHSA-2024:7164
-
Red Hat OpenShift Container Platform 4.16 openshift4/ose-monitoring-plugin-rhel9 v4.16.0-202406140306.p0.gf1fc431.assembly.stream.el9fixed: vendor fix RHSA-2024:0041
-
Red Hat OpenShift GitOps 1.10 openshift-gitops-1/dex-rhel8 v1.10.5-6, openshift-gitops-1/argocd-rhel8 v1.10.5-6, openshift-gitops-1/gitops-rhel8 v1.10.5-6, openshift-gitops-1/must-gather-rhel8 v1.10.5-6, openshift-gitops-1/kam-delivery-rhel8 v1.10.5-6, openshift-gitops-1/argo-rollouts-rhel8 v1.10.5-6, +3 morefixed: vendor fix RHSA-2024:2817
-
Red Hat OpenShift GitOps 1.11 openshift-gitops-1/dex-rhel8 v1.11.4-7, openshift-gitops-1/argocd-rhel8 v1.11.4-7, openshift-gitops-1/gitops-rhel8 v1.11.4-7, openshift-gitops-1/must-gather-rhel8 v1.11.4-7, openshift-gitops-1/kam-delivery-rhel8 v1.11.4-7, openshift-gitops-1/argo-rollouts-rhel8 v1.11.4-7, +3 morefixed: vendor fix RHSA-2024:2815
-
Red Hat OpenShift GitOps 1.12 openshift-gitops-1/dex-rhel8 v1.12.2-1, openshift-gitops-1/argocd-rhel8 v1.12.2-1, openshift-gitops-1/gitops-rhel8 v1.12.2-1, openshift-gitops-1/must-gather-rhel8 v1.12.2-1, openshift-gitops-1/kam-delivery-rhel8 v1.12.2-1, openshift-gitops-1/argo-rollouts-rhel8 v1.12.2-1, +3 morefixed: vendor fix RHSA-2024:2816
-
Red Hat RHACS 4.4 for RHEL 8 advanced-cluster-security/rhacs-main-rhel8 4.4.2-6, advanced-cluster-security/rhacs-roxctl-rhel8 4.4.2-4, advanced-cluster-security/rhacs-scanner-rhel8 4.4.2-4, advanced-cluster-security/rhacs-rhel8-operator 4.4.2-4, advanced-cluster-security/rhacs-collector-rhel8 4.4.2-4, advanced-cluster-security/rhacs-operator-bundle 4.4.2-6, +7 morefixed: vendor fix RHSA-2024:2941
-
Red Hat RHODF 4.14 for RHEL 9 odf4/odf-console-rhel9 v4.14.18-3fixed: vendor fix RHSA-2025:8551
-
Red Hat RHODF 4.15 for RHEL 9 odf4/odf-console-rhel9 v4.15.14-2fixed: vendor fix RHSA-2025:8544
-
Red Hat RHODF 4.16 for RHEL 9 odf4/odf-console-rhel9 v4.16.2-2fixed: vendor fix RHSA-2024:6755
-
Red Hat Cryostat 2 devspaces/code-rhel9 Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/kibana6-rhel8, openshift-logging/logging-view-plugin-rhel9 Red Hat Migration Toolkit for Applications 6 webpack-dev-middleware Red Hat MTA 6.2 for RHEL 8 mta/mta-hub-rhel9 6.2.3-1, mta/mta-rhel8-operator 6.2.3-1, mta/mta-operator-bundle 6.2.3-4, mta/mta-pathfinder-rhel9 6.2.3-1 Red Hat MTA 7.0 for RHEL 8 mta/mta-rhel8-operator 7.0.3-7 Red Hat MTA 7.0 for RHEL 9 mta/mta-hub-rhel9 7.0.3-10, mta/mta-operator-bundle 7.0.3-25, mta/mta-windup-shim-rhel9 7.0.3-12, mta/mta-analyzer-lsp-rhel9 7.0.3-13, mta/mta-analyzer-addon-rhel9 7.0.3-13not affected: vulnerable code not present
+3 more productsfewer
Red Hat Multicluster Engine for Kubernetes multicluster-engine/multicluster-engine-console-mce-rhel9 Red Hat OpenShift Service Mesh 2 openshift-service-mesh/kiali-rhel9 Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/console-rhel8
17 more not affected in the full advisory
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
1.23% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 7.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | webpack-dev-middleware | >=7.0.0, <7.1.0 >=6.0.0, <6.1.2 <5.3.4 |
7.1.0 6.1.2 5.3.4 |
Affected products
- webpack webpack-dev-middleware
- webpack.js webpack-dev-middleware
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/webpack/webpack-dev-middleware/commit/189c4ac7d2344ec132a4689e74dc837ec5be0132
web, patch
-
github.com
/webpack/webpack-dev-middleware/commit/9670b3495da518fe667ff3428c5e4cb9f2f3d353
web, patch
-
github.com
/webpack/webpack-dev-middleware/commit/e10008c762e4d5821ed6990348dabf0d4d93a10e
web, patch
-
github.com
/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/getFilenameFromUrl.js#
web, patch
-
github.com
/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/setupOutputFileSystem.
web, patch
-
github.com
/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6
web, exploit, vendor-advisory
-
github.com
/webpack/webpack-dev-middleware/releases/tag/v5.3.4
web, product, release-notes
-
github.com
/webpack/webpack-dev-middleware/releases/tag/v6.1.2
web, product, release-notes
-
github.com
/webpack/webpack-dev-middleware/releases/tag/v7.1.0
web, product, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2024-29180
advisory
-
github.com
/webpack/webpack-dev-middleware
package
Sources
- CVE List CVE-2024-29180
- GitHub Advisory GHSA-wr3j-pwj9-hqq6
- NVD CVE-2024-29180
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.