cve.bz

CVE-2024-29180 webpack.js webpack-dev-middleware: Path traversal

7.5 highExploit referenceEPSS 1.2%Fix available

High (7.5) in webpack.js webpack-dev-middleware. EPSS 1.2% estimated probability of exploitation activity in the next 30 days. Fixed in webpack-dev-middleware 5.3.4, 6.1.2, 7.1.0.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
1.2% (unchanged from 1.2% a week ago; 1.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 70th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2024-08-02. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-29180 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-29180?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-29180?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-29180 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
webpack.js:webpack-dev-middlewarebefore 5.3.4
webpack.js:webpack-dev-middlewarefrom 6.0.0 before 6.1.2
webpack.js:webpack-dev-middlewarefrom 7.0.0 before 7.1.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-wr3j-pwj9-hqq6npmwebpack-dev-middleware>=7.0.0 <7.1.07.1.0
GHSA-wr3j-pwj9-hqq6npmwebpack-dev-middleware>=6.0.0 <6.1.26.1.2
GHSA-wr3j-pwj9-hqq6npmwebpack-dev-middleware<5.3.45.3.4

Red Hat

Red Hat rates this Important.

Red Hat's statement

The vulnerability in webpack-dev represents a important security issue due to its potential to expose sensitive files and compromise developer machines. By failing to validate URLs and normalize paths effectively, the middleware allows attackers to craft malicious requests that can retrieve arbitrary local files or perform unauthorized path traversal. This could lead to unauthorized access to confidential information, including source code, configuration files, and even system-level files. Given the widespread use of webpack-dev-middleware in web development environments, addressing this vulnerability promptly is important to prevent serious data breaches and protect the integrity of development processes.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Migration Toolkit for Runtimes 1 on RHEL 8webpack-dev-middlewareFixed 2024-06-13RHSA-2024:3920
MTA-6.2-RHEL-9mta/mta-ui-rhel9:6.2.3-2Fixed 2024-06-20RHSA-2024:3989
MTA-6.2-RHEL-9mta/mta-windup-addon-rhel9:6.2.3-2Fixed 2024-06-20RHSA-2024:3989
MTA-7.0-RHEL-9mta/mta-cli-rhel9:7.0.3-16Fixed 2024-05-23RHSA-2024:3316
MTA-7.0-RHEL-9mta/mta-ui-rhel9:7.0.3-13Fixed 2024-05-23RHSA-2024:3316
NETWORK-OBSERVABILITY-1.6.0-RHEL-9network-observability/network-observability-cli-rhel9:v1.6.0-66Fixed 2024-06-17RHSA-2024:3868
NETWORK-OBSERVABILITY-1.6.0-RHEL-9network-observability/network-observability-console-plugin-rhel9:v1.6.0-66Fixed 2024-06-17RHSA-2024:3868
NETWORK-OBSERVABILITY-1.6.0-RHEL-9network-observability/network-observability-ebpf-agent-rhel9:v1.6.0-66Fixed 2024-06-17RHSA-2024:3868
NETWORK-OBSERVABILITY-1.6.0-RHEL-9network-observability/network-observability-flowlogs-pipeline-rhel9:v1.6.0-66Fixed 2024-06-17RHSA-2024:3868
NETWORK-OBSERVABILITY-1.6.0-RHEL-9network-observability/network-observability-operator-bundle:1.6.0-78Fixed 2024-06-17RHSA-2024:3868
Cryostat 2webpack-dev-middlewareNot affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/kibana6-rhel8Not affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/logging-view-plugin-rhel8Not affected
Migration Toolkit for Applications 6webpack-dev-middlewareNot affected
Migration Toolkit for Virtualizationmigration-toolkit-virtualization/mtv-console-plugin-rhel9Affected
Multicluster Engine for Kubernetesmulticluster-engine/console-mce-rhel9Not affected
Multicluster Engine for Kubernetesmulticluster-engine/multicluster-engine-console-mce-rhel9Not affected
Node HealthCheck Operatorworkload-availability/node-remediation-console-rhel8Will not fix
OpenShift Serverlesswebpack-dev-middlewareAffected
OpenShift Service Mesh 2openshift-service-mesh/kiali-rhel8Not affected
105 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-29180.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON