{"id":11396,"date":"2026-09-04T18:53:13","date_gmt":"2026-09-04T10:53:13","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-76844"},"modified":"2026-09-04T18:53:13","modified_gmt":"2026-09-04T10:53:13","slug":"cve-2026-76844","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-76844","title":{"rendered":"CVE-2026-76844 [HIGH] &#8211; webpack-dev-middleware resolves a request to a local file in getFilenameFromUrl by testing"},"content":{"rendered":"<p>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, UP_PATH_REGEXP applied to path.normalize(`.\/${pathname}`), only matches &#8220;..&#8221; 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 &#8220;assets..&#8221; and so passes the guard, but the offset slice cuts within that segment and hands &#8220;..\/.env&#8221; 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 &#8220;auto&#8221; resolves to &#8220;\/&#8221; 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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, UP<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-11396","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/11396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}