CVE-2026-76844
High · 7.4CVSS
7.4
EPSS
0.6%
Published
Aug 24, 2026
CISA due date
—
Cloudanix analysis
A flaw in certain Red Hat development web servers lets attackers read files they should not by using a specially crafted web address that slips past basic safety checks.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Incomplete path traversal guard in getFilenameFromUrl allows a request pathname containing an embedded dot-dot segment (e.g., /assets../.env against publicPath /assets) to bypass UP_PATH_REGEXP after normalize, pass the startsWith containment test, and yield a sliced pathname that path.join resolves one directory above outputPath when the middleware uses a real filesystem (writeToDisk or custom outputFileSystem).
Why it matters to the business
Organizations running the affected Red Hat middleware components risk exposure of files one directory above the build output directory, potentially leaking configuration or secrets in development or staging environments that enable disk writes; the flaw remains exploitable 61 days after publication with a slowly rising EPSS score.
How an attack unfolds
An attacker identifies a webpack-dev-middleware instance whose publicPath lacks a trailing slash and that writes to disk, crafts a request such as GET /assets../.env, the guard accepts the pathname because the only dot-dot sits inside a single segment, the slice operation produces ../.env, and path.join resolves it to the parent directory, returning the file contents.
How to fix it
Upgrade discovery/discovery to ui-rhel9:1788206196, redhat-datagrid to maven-repository.zip, and rhmtc/openshift-migration to ui-rhel8:1789546373 under RHSA-2026:61783; ensure publicPath ends with a trailing slash and disable writeToDisk or custom outputFileSystem in production.
How to confirm the fix worked
Confirm package versions match the RHSA fixed builds, test that requests containing embedded dot-dot segments return 404 or 403, and verify that only the intended output directory is readable when writeToDisk is enabled.
Typical attack path
- Discover public webpack-dev-middleware endpoint and its configured publicPath value
- Send GET request whose pathname embeds ../ inside a segment that still startsWith the publicPath (e.g., /assets../.env)
- Bypass the segment-only UP_PATH_REGEXP guard and offset slice
- Obtain file contents from one directory above the outputPath when filesystem backing is enabled
How to detect it
Search web-server access logs for GET requests whose path contains a segment with embedded dot-dot (e.g., assets.. or similar patterns) immediately followed by file names such as .env, application.properties, or other sensitive extensions; correlate with any 200 responses serving content outside the expected build directory.
- GET /assets../.env
- pathname containing segment with embedded .. before slice
- 200 response serving .env or parent-directory files from webpack-dev-middleware
What your security team should do
- Apply RHSA-2026:61783 patches to all three Red Hat components immediately given the 61-day exposure window
- Audit publicPath configuration to enforce trailing slashes across all webpack-dev-middleware deployments
- Disable writeToDisk and custom outputFileSystem in any environment reachable from untrusted networks
- Add request-path allow-listing that rejects pathnames containing dot characters adjacent to path segments
The record
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 ".." 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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-108327 Tanium addressed a path traversal vulnerability in Tanium Data Service. CWE-22
- CVE-2026-121542 In Docker Buildx versions v0.19.0 through v0.38.0, an untrusted Bake definition may… CWE-22
- CVE-2026-63502 Yeti bridges the gap between CTI and DFIR practitioners by providing a Forensics… CWE-22
- CVE-2026-63478 isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. CWE-22
- CVE-2026-63500 Yeti bridges the gap between CTI and DFIR practitioners by providing a Forensics… CWE-22
- CVE-2026-63395 isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. CWE-22
- CVE-2026-63436 zt-zip is a Java library that provides convenience methods for ZIP archive manipulation. CWE-22
- CVE-2026-121263 A vulnerability was determined in phpMyAdmin MoTranslator up to 6.0.1. CWE-22