webpack-dev-middleware before 7.4.6 and 8.3.0 Path Traversal via Non-Slash-Terminated publicPath (webpack webpack-dev-middleware)

CVE-2026-76844
HIGH 8.3

At a glance

Source
NVD
EPSS
EPSS 0.76 % · percentile 57 ()
State
PUBLISHED
Published
Updated
Assigner
VulnCheck
Affected products
webpack · webpack-dev-middleware
NVD status
Deferred

Description

webpack-dev-middleware 5.3.4, 6.1.2 through 6.1.3, 7.1.0 before 7.4.6, and 8.0.0 before 8.3.0 contains a path traversal vulnerability in getFilenameFromUrl that bypasses the fix for CVE-2024-29180: a publicPath without a trailing slash is matched by string prefix, and the '..' guard runs before that prefix is stripped. Unauthenticated attackers can request a path such as /assets../secret to read files one directory above the output directory when the middleware serves from the physical filesystem through writeToDisk or a custom outputFileSystem.

Weaknesses (CWE)

  • CWE-22 — Improper Limitation of a Pathname to a Restricted Directory

Credits

  • Muhammad Sobirov finder

References

Scores

VersionScoreVectorScored by
CVSS 4.0HIGH 8.3CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:NVulnCheck
CVSS 3.1HIGH 7.4CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:NVulnCheck
CVSS 4.0HIGH 8.3CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XNVD · disclosure@vulncheck.com (Secondary)
CVSS 3.1HIGH 7.4CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:NNVD · disclosure@vulncheck.com (Primary)

Advisories

European references

CERT-FR advisories

Affected products

ProductAffected versions
webpack · webpack-dev-middleware
webpack-dev-middleware
affected : ≥ 5.3.4 ≤ 5.3.4
affected : ≥ 6.1.2 ≤ 6.1.3
affected : ≥ 7.1.0 < 7.4.6
unaffected : 7.4.6
affected : ≥ 8.0.0 < 8.3.0
unaffected : 8.3.0
Other versions : unaffected

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD