PT-2026-80854
CVE-2026-76844
·
Published
2024-03-21
·
Updated
2026-10-13
Description by
CVSS 4.0
8.3
HighMetricsAV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions
webpack-dev-middleware versions 5.3.4 through 5.x
webpack-dev-middleware versions 6.1.2 through 6.x
webpack-dev-middleware versions 7.1.0 through 7.x
Description
The software fails to sufficiently validate URL addresses before returning local files, allowing potential access to files on the developer's machine. This occurs in the
getFilenameFromUrl() function when the publicPath is configured without a trailing slash. An attacker can craft a request where a dot-dot sequence is embedded within a path segment (e.g., /assets../.env), bypassing the traversal guard. The system then slices the path at a fixed offset, resulting in a path traversal that resolves one directory above the output path. This issue specifically affects environments where the middleware is backed by the physical filesystem, such as when the writeToDisk variable is set to true or a custom outputFileSystem is provided. If the development server is exposed to a network or allows cross-origin requests, an attacker could exfiltrate sensitive files like passwords or source code.Recommendations
For webpack-dev-middleware versions 5.3.4 through 5.x, 6.1.2 through 6.x, and 7.1.0 through 7.x, set the
writeToDisk variable to false or avoid using a custom outputFileSystem to prevent physical filesystem access.
As a temporary mitigation, ensure the publicPath configuration ends with a trailing slash to prevent the offset slicing bypass.Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Found an issue in the description? Have something to add? Feel free to write us 👾