CVE-2026-76844: Webpack dev middleware Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-g84c-rxfj-3j2c
CVSS 7.4
CWE-22
Published
Advisory Summary

CVE-2026-76844 is a HIGH (CVSS 7.4) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Webpack dev middleware libraries in the npm ecosystem. The issue involves webpack-dev-middleware vulnerable to path traversal via non-slash-terminated publicpath. Remediation is available by upgrading affected packages to version 8.3.0, 7.4.6.

CVE-2026-76844 at a Glance

CVE Identifier CVE-2026-76844
GHSA Identifier GHSA-g84c-rxfj-3j2c
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Webpack dev middleware
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-76844

To remediate this vulnerability, upgrade all affected Webpack dev middleware dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

webpack-dev-middleware fixed: 8.3.0
npm install webpack-dev-middleware@8.3.0
webpack-dev-middleware fixed: 7.4.6
npm install webpack-dev-middleware@7.4.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls webpack-dev-middleware

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-76844, inspect your project dependencies using npm:

npm ls webpack-dev-middleware

Analyze the terminal output to locate any version of Webpack dev middleware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.3.0), your application is affected.

Note: The npm ls webpack-dev-middleware command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Webpack dev middleware, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

> [!IMPORTANT] > CVE-2026-76844 was assigned and published for this issue by VulnCheck on 2026-08-24 without prior coordination with the webpack maintainers or the OpenJS Foundation, which holds the CVE Numbering Authority scope for webpack projects. Neither the maintainers nor the OpenJS CNA were notified before publication, and no fix was available at that time. This advisory is the coordinated record produced by the webpack maintainers and the OpenJS Foundation CNA. ### Impact `webpack-dev-middleware` resolves a request to a local file in `getFilenameFromUrl`. When the configured `publicPath` has no trailing slash (for example `/assets`), a request that shares that prefix without being under it (for example `/assets../secret`) still passes the containment check, and the `..` guard does not catch it because it runs on the path before the `publicPath` prefix is stripped. The stripped remainder then escapes the configured output directory once joined, so an unauthenticated request can read files outside the output root. Applications serving `webpack-dev-middleware` (directly or via `webpack-dev-server`) with a `publicPath` that does not end in a slash are affected. A development server reachable on the network can be attacked with a single request and no victim interaction. ### Patches Patched in `webpack-dev-middleware` 8.3.0. There is no backport to the 5.x, 6.x, or 7.x lines; users on those lines should upgrade to 8.3.0 or later. ### Workarounds Configure `publicPath` with a trailing slash (for example `/assets/` instead of `/assets`), or upgrade to a patched version. ### References - [CVE-2024-29180](https://www.cve.org/CVERecord?id=CVE-2024-29180) ([GHSA-wr3j-pwj9-hqq6](https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6)), the earlier path traversal in the same component that this issue bypasses.

CVE-2026-76844 Affected Webpack dev middleware Versions

2 component(s)
Fixed Versions:
8.3.07.4.6
Product / Package Ecosystem Affected Versions Fixed Version
webpack-dev-middleware
npm
≥ 8.0.0
< 8.3.0
8.3.0
webpack-dev-middleware
npm
< 7.4.6
7.4.6

References

Frequently Asked Questions

What is CVE-2026-76844?
CVE-2026-76844 is a security vulnerability in Webpack dev middleware involving webpack-dev-middleware vulnerable to Path Traversal via non-slash-terminated publicPath under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Webpack dev middleware versions are affected?
Affected versions include releases prior to 8.3.0, 7.4.6 across affected packages: webpack-dev-middleware.
What version fixes CVE-2026-76844?
Upgrading to 8.3.0, 7.4.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is webpack-dev-middleware affected?
Yes, webpack-dev-middleware is affected in releases prior to 8.3.0, 7.4.6. Upgrade your dependency to 8.3.0, 7.4.6 or later.
What is the CVSS score of CVE-2026-76844?
CVE-2026-76844 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-76844?
CVE-2026-76844 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2026-76844?
Run the dependency tree command: 'npm ls webpack-dev-middleware'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g84c-rxfj-3j2c",
  "modified" : "2026-09-29T16:59:18Z",
  "published" : "2026-09-29T16:59:18Z",
  "aliases" : [ "CVE-2026-76844" ],
  "summary" : "webpack-dev-middleware vulnerable to Path Traversal via non-slash-terminated publicPath",
  "details" : "> [!IMPORTANT]\n> CVE-2026-76844 was assigned and published for this issue by VulnCheck on 2026-08-24 without prior coordination with the webpack maintainers or the OpenJS Foundation, which holds the CVE Numbering Authority scope for webpack projects. Neither the maintainers nor the OpenJS CNA were notified before publication, and no fix was available at that time. This advisory is the coordinated record produced by the webpack maintainers and the OpenJS Foundation CNA.\n\n### Impact\n\n`webpack-dev-middleware` resolves a request to a local file in `getFilenameFromUrl`. When the configured `publicPath` has no trailing slash (for example `/assets`), a request that shares that prefix without being under it (for example `/assets../secret`) still passes the containment check, and the `..` guard does not catch it because it runs on the path before the `publicPath` prefix is stripped. The stripped remainder then escapes the configured output directory once joined, so an unauthenticated request can read files outside the output root. Applications serving `webpack-dev-middleware` (directly or via `webpack-dev-server`) with a `publicPath` that does not end in a slash are affected. A development server reachable on the network can be attacked with a single request and no victim interaction.\n\n### Patches\n\nPatched in `webpack-dev-middleware` 8.3.0. There is no backport to the 5.x, 6.x, or 7.x lines; users on those lines should upgrade to 8.3.0 or later.\n\n### Workarounds\n\nConfigure `publicPath` with a trailing slash (for example `/assets/` instead of `/assets`), or upgrade to a patched version.\n\n### References\n\n- [CVE-2024-29180](https://www.cve.org/CVERecord?id=CVE-2024-29180) ([GHSA-wr3j-pwj9-hqq6](https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6)), the earlier path traversal in the same component that this issue bypasses.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "webpack-dev-middleware"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.3.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "webpack-dev-middleware"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.4.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 7.4.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-middleware/security/advisories/GHSA-g84c-rxfj-3j2c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-76844"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-middleware/pull/2404"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-middleware/commit/13344e78b26d88fe9b7c8381a3860e248a52359b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-middleware/commit/cefccbac330c29052fc6dffe85fd292ea2ac782b"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-wr3j-pwj9-hqq6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/webpack/webpack-dev-middleware"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-middleware/blob/v8.1.1/src/middleware.js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-middleware/releases/tag/v7.4.6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/webpack/webpack-dev-middleware/releases/tag/v8.3.0"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/webpack-dev-middleware-path-traversal-via-offset-slice-on-a-non-slash-terminated-publicpath"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-29T16:59:18Z",
    "nvd_published_at" : null
  }
}