CVE-2024-29180
webpack-dev-middleware Path Traversal vulnerability
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
7.4
webpack-dev-middleware Path Traversal vulnerability
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.
- Record
CVE-2024-29180- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2024-1028
7.4
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.
- Record
EUVD-2024-1028- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-wr3j-pwj9-hqq6
7.4
Path traversal in webpack-dev-middleware
Summary
The webpack-dev-middleware middleware 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.
Details
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: https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/setupOutputFileSystem.js#L21
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: https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/getFilenameFromUrl.js#L82 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.
PoC
A blank project can be created containing the following configuration file webpack.config.js:
module.exports = { devServer: { devMiddleware: { writeToDisk: true } } };
When started, it is possible to access any local file, e.g. /etc/passwd:
$ curl localhost:8080/public/..%2f..%2f..%2f..%2f../etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
Impact
The 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 (e.g. password, configuration files, private source code, ...).
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 (CORS, Allow-Access-Origin: * ), 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.
Recommendation
The URL should be unescaped and normalized before any further processing.
- Record
GHSA-wr3j-pwj9-hqq6- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
7.4
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.
- Record
CVE-2024-29180- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - 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 - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
7.4
webpack-dev-middleware Path Traversal vulnerability
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.
- Record
CVE-2024-29180- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-wr3j-pwj9-hqq6
7.4
Path traversal in webpack-dev-middleware
Summary
The webpack-dev-middleware middleware 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.
Details
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: https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/setupOutputFileSystem.js#L21
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: https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/getFilenameFromUrl.js#L82 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.
PoC
A blank project can be created containing the following configuration file webpack.config.js:
module.exports = { devServer: { devMiddleware: { writeToDisk: true } } };
When started, it is possible to access any local file, e.g. /etc/passwd:
$ curl localhost:8080/public/..%2f..%2f..%2f..%2f../etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
Impact
The 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 (e.g. password, configuration files, private source code, ...).
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 (CORS, Allow-Access-Origin: * ), 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.
Recommendation
The URL should be unescaped and normalized before any further processing.
- Record
GHSA-wr3j-pwj9-hqq6- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
Show 15 moreShow less
OSVCLSA-2026-1774311626 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 3.7.2-tuxcare.1.
- Record
CLSA-2026-1774311626- Updated
- 2026-11-02
OSVCLSA-2026-1774311628 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 5.0.0-tuxcare.1.
- Record
CLSA-2026-1774311628- Updated
- 2026-11-02
OSVCLSA-2026-1774311629 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 5.3.0-tuxcare.1.
- Record
CLSA-2026-1774311629- Updated
- 2026-11-02
OSVCLSA-2026-1774311637 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 1.12.2-tuxcare.1.
- Record
CLSA-2026-1774311637- Updated
- 2026-11-02
OSVCLSA-2026-1776299675 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 3.5.1-tuxcare.1.
- Record
CLSA-2026-1776299675- Updated
- 2026-11-02
OSVCLSA-2026-1776299676 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 3.4.0-tuxcare.1.
- Record
CLSA-2026-1776299676- Updated
- 2026-11-02
OSVCLSA-2026-1779238049 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 3.7.3-tuxcare.1.
- Record
CLSA-2026-1779238049- Updated
- 2026-11-02
OSVCLSA-2026-1779238056 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 5.3.3-tuxcare.1.
- Record
CLSA-2026-1779238056- Updated
- 2026-11-02
OSVCLSA-2026-1784596341 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 1.12.0-tuxcare.1.
- Record
CLSA-2026-1784596341- Updated
- 2026-11-02
OSVCLSA-2026-1784856457 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 1.10.2-tuxcare.1.
- Record
CLSA-2026-1784856457- Updated
- 2026-11-02
OSVCLSA-2026-1789721764 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 1.11.0-tuxcare.1.
- Record
CLSA-2026-1789721764- Updated
- 2026-11-02
OSVCLSA-2026-1790520250 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 3.0.1-tuxcare.1.
- Record
CLSA-2026-1790520250- Updated
- 2026-11-02
OSVCLSA-2026-1790866070 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 6.1.3-tuxcare.1.
- Record
CLSA-2026-1790866070- Updated
- 2026-11-02
OSVCLSA-2026-1790866099 No score
TuxCare security update for webpack-dev-middleware (1 CVE)
TuxCare rebuilt webpack-dev-middleware to address 1 CVE. Fixed in 5.3.4-tuxcare.2.
- Record
CLSA-2026-1790866099- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2024-29180 No score
CVE-2024-29180 in webpack-dev-middleware - Patched by Root
Root has patched CVE-2024-29180 in the webpack-dev-middleware package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2024-29180- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
webpack-dev-middlewarenpm |
7.0.0 up to 7.1.0 | 7.1.0 |
webpack-dev-middlewarenpm |
6.0.0 up to 6.1.2 | 6.1.2 |
webpack-dev-middlewarenpm |
through 5.3.3 | 5.3.4 |
webpack-dev-middlewareTuxCare:npm |
3.7.2-tuxcare.0 up to 3.7.2-tuxcare.1, plus listed versions 3.7.2 |
3.7.2-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
5.0.0-tuxcare.0 up to 5.0.0-tuxcare.1, plus listed versions 5.0.0 |
5.0.0-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
5.3.0-tuxcare.0 up to 5.3.0-tuxcare.1, plus listed versions 5.3.0 |
5.3.0-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
1.12.2-tuxcare.0 up to 1.12.2-tuxcare.1, plus listed versions 1.12.2 |
1.12.2-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
3.5.1-tuxcare.0 up to 3.5.1-tuxcare.1, plus listed versions 3.5.1 |
3.5.1-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
3.4.0-tuxcare.0 up to 3.4.0-tuxcare.1, plus listed versions 3.4.0 |
3.4.0-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
3.7.3-tuxcare.0 up to 3.7.3-tuxcare.1, plus listed versions 3.7.3 |
3.7.3-tuxcare.1 |
Show 10 moreShow less
| Package | Affected | Fixed |
|---|---|---|
webpack-dev-middlewareTuxCare:npm |
5.3.3-tuxcare.0 up to 5.3.3-tuxcare.1, plus listed versions 5.3.3 |
5.3.3-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
1.12.0-tuxcare.0 up to 1.12.0-tuxcare.1, plus listed versions 1.12.0 |
1.12.0-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
1.10.2-tuxcare.0 up to 1.10.2-tuxcare.1, plus listed versions 1.10.2 |
1.10.2-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
1.11.0-tuxcare.0 up to 1.11.0-tuxcare.1, plus listed versions 1.11.0 |
1.11.0-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
3.0.1-tuxcare.0 up to 3.0.1-tuxcare.1, plus listed versions 3.0.1 |
3.0.1-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
6.1.3-tuxcare.0 up to 6.1.3-tuxcare.1, plus listed versions 6.1.3 |
6.1.3-tuxcare.1 |
webpack-dev-middlewareTuxCare:npm |
5.3.4-tuxcare.0 up to 5.3.4-tuxcare.2, plus listed versions 5.3.45.3.4-tuxcare.1 |
5.3.4-tuxcare.2 |
webpack-dev-middlewarenpm |
before 5.3.4 | 5.3.4 |
webpack-dev-middlewareRoot:npm |
before 3.7.2-aikido.1 | 3.7.2-aikido.14.3.0-aikido.23.7.3-aikido.24.3.0-aikido.33.7.2-aikido.23.7.3-aikido.3 |
@rootio/webpack-dev-middlewareRoot:npm |
before 3.7.2-root.io.1 | 3.7.2-root.io.14.3.0-root.io.13.7.3-root.io.14.3.0-root.io.23.7.3-root.io.24.3.0-root.io.33.7.2-root.io.23.7.3-root.io.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-29180 is a high vulnerability (CVSS 7.4) in Webpack Webpack-dev-middleware, published March 21, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.23%, the 69th percentile. Fixed in webpack-dev-middleware 7.1.0.
References
github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6
github.com/webpack/webpack-dev-middleware/commit/189c4ac7d2344ec132a4689e74dc837ec5be0132
github.com/webpack/webpack-dev-middleware/commit/9670b3495da518fe667ff3428c5e4cb9f2f3d353
github.com/webpack/webpack-dev-middleware/commit/e10008c762e4d5821ed6990348dabf0d4d93a10e
github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/getFilenameFromUrl.js
github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/setupOutputFileSystem.js
Show 7 moreShow less
github.com/webpack/webpack-dev-middleware/releases/tag/v5.3.4
github.com/webpack/webpack-dev-middleware/releases/tag/v6.1.2
github.com/webpack/webpack-dev-middleware/releases/tag/v7.1.0
nvd.nist.gov/vuln/detail/CVE-2024-29180
github.com/advisories/GHSA-wr3j-pwj9-hqq6
github.com/CVEProject/cvelistV5/tree/main/cves/2024/29xxx/CVE-2024-29180.json
github.com/webpack/webpack-dev-middleware