#VU90715 Path traversal in webpack-dev-middleware - CVE-2024-29180
Published: June 3, 2024
webpack-dev-middleware
webpack
Description
The vulnerability allows a remote attacker to perform directory traversal attacks.
The vulnerability exists due to webpack-dev-middleware development middleware for devpack does not validate the supplied URL address sufficiently before returning the local file. A remote attacker can send a specially crafted HTTP request and read arbitrary files on the system.
Remediation
External links
- https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6
- https://github.com/webpack/webpack-dev-middleware/commit/189c4ac7d2344ec132a4689e74dc837ec5be0132
- https://github.com/webpack/webpack-dev-middleware/commit/9670b3495da518fe667ff3428c5e4cb9f2f3d353
- https://github.com/webpack/webpack-dev-middleware/commit/e10008c762e4d5821ed6990348dabf0d4d93a10e
- https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/getFilenameFromUrl.js#L82
- https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/setupOutputFileSystem.js#L21
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v5.3.4
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v6.1.2
- https://github.com/webpack/webpack-dev-middleware/releases/tag/v7.1.0