CVE-2026-76844

Source
https://cve.org/CVERecord?id=CVE-2026-76844
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-76844.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-76844
Aliases
Downstream
Published
2026-08-24T13:12:01.148Z
Modified
2026-08-28T11:30:41.385864133Z
Severity
  • 8.3 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N CVSS Calculator
Summary
webpack-dev-middleware Path Traversal via Offset Slice on a Non-Slash-Terminated publicPath
Details

webpack-dev-middleware resolves a request to a local file in getFilenameFromUrl by testing the request pathname against a traversal guard and then slicing it at a fixed character offset. The guard, UPPATHREGEXP applied to path.normalize(./${pathname}), only matches ".." that stands as a whole path segment, while the containment test is the string comparison pathname.startsWith(publicPathPathname) and the file path is built as path.join(outputPath, pathname.slice(publicPathPathname.length)). When the configured publicPath has no trailing slash, a request such as GET /assets../.env against publicPath /assets yields the pathname /assets../.env, whose only dot-dot sits inside the segment "assets.." and so passes the guard, but the offset slice cuts within that segment and hands "../.env" to path.join, resolving one directory above outputPath. Reading a file from that path requires the middleware to be backed by the physical filesystem, which happens when writeToDisk is true or a custom outputFileSystem is supplied, since the default memfs volume holds only build output. Traversal depth is limited to a single directory because a separately delimited dot-dot segment is collapsed during URL parsing before the guard runs. The default publicPath value of "auto" resolves to "/" and is not affected. This is an incomplete fix for CVE-2024-29180: the guard and offset slice were introduced by that fix and are present in every release from 5.3.4, 6.1.2 and 7.1.0 onward.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76844.json",
    "cwe_ids": [
        "CWE-22"
    ],
    "cna_assigner": "VulnCheck"
}
References

Affected packages

Git / github.com/webpack/webpack-dev-middleware

Affected ranges

Type
GIT
Repo
https://github.com/webpack/webpack-dev-middleware
Events
Database specific
Show details
{
    "source": "AFFECTED_FIELD",
    "extracted_events": [
        {
            "introduced": "6.1.2"
        },
        {
            "last_affected": "6.1.3"
        },
        {
            "introduced": "7.1.0"
        },
        {
            "last_affected": "7.4.5"
        },
        {
            "introduced": "8.0.0"
        },
        {
            "last_affected": "8.1.1"
        },
        {
            "introduced": "5.3.4"
        },
        {
            "last_affected": "5.3.4"
        }
    ]
}

Affected versions

5.*
5.3.4
v5.*
v5.3.4
v6.*
v6.1.2
v6.1.3
v7.*
v7.1.0
v7.1.1
v7.2.0
v7.2.1
v7.3.0
v7.4.0
v7.4.1
v7.4.2
v7.4.3
v7.4.4
v7.4.5
v8.*
v8.0.0
v8.0.1
v8.0.2
v8.0.3
v8.0.4
v8.1.0
v8.1.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-76844.json"