CVE Database›Document archive›CVE-2026-76844

CVE-2026-76844

webpack-dev-middleware: webpack-dev-middleware: Information Disclosure via Path Traversal

Loading…

Severity

Important

Red Hat Product Security

8.6

CVSS 3.1

Review impact separately from score.

Published · August 24, 2026

Updated · November 1, 2026

Description

A flaw was found in webpack-dev-middleware. A remote attacker can exploit a path traversal vulnerability when the configured publicPath lacks a trailing slash. By sending a specially crafted request, the attacker can bypass a security guard, allowing the middleware to resolve files from one directory above the intended output path. This could lead to information disclosure if the middleware is configured to use the physical filesystem.

Statement

A path traversal flaw exists in webpack-dev-middleware when resolving URLs using a publicPath configuration lacking a trailing slash. By supplying a crafted URL with improper dot-dot positioning within a segment, an attacker can bypass the path traversal validation guard and offset calculation. When backed by a physical filesystem (writeToDisk enabled or custom outputFileSystem), this allows an unauthenticated remote attacker to read arbitrary files one directory level above the intended output directory.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Ensure that the configured publicPath always ends with a trailing slash (e.g., '/assets/'), or utilize the default setting ('auto'), which resolves to '/' and is unmitigated by default. Alternatively, avoid backing the middleware with a physical filesystem (writeToDisk: false).

CVSS / CWE

CVSS 3.1 · 8.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

CWE-22 · Improper Limitation of a Pathname to a Restricted Directory