Angular SSR: Path Traversal to Sibling Directories in CommonEngine on Windows
angular-cli
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @angular/ssr npm |
|
|
angular-cli
| Product | Affected | Fixed in |
|---|---|---|
| @angular/ssr npm |
|
|
The Angular SSR is a server-rise rendering tool for Angular applications. Prior to versions 20.3.36, 21.2.23, and 22.1.7, the CommonEngine retrieveSSGPage prerendered-page retrieval logic in @angular/ssr/node, and in @angular/ssr for versions 17 through 18, accepts a relative request URL containing a backslash parent-traversal segment on Windows. The non-special resolve:// URL base preserves the backslash, path.join interprets it as a Windows separator, and the pagePath.startsWith(normalize(publicPath)) check incorrectly accepts a sibling output directory whose name shares the configured public-directory prefix. An unauthenticated requester can therefore retrieve a sibling prerendered HTML page when that page contains the Angular SSG marker. The issue is limited to Windows deployments that pass relative request URLs to CommonEngine.render, have a prefix-sharing sibling output directory, and contain qualifying prerendered Angular HTML; it does not provide arbitrary file read. This issue is fixed in versions 20.3.36, 21.2.23, and 22.1.7.
From the CVE record · GitHub_M
On Windows, CommonEngine’s prerendered-page retrieval can accept a backslash parent-traversal segment in a relative request URL. An unauthenticated requester can retrieve a sibling prerendered Angular HTML page if the deployment passes relative URLs to CommonEngine.render, the sibling output directory shares the public-directory prefix, and the page contains the Angular SSG marker; this is not an arbitrary file read.
Teams running @angular/ssr versions 22.0.0–22.1.6, 21.0.0–21.2.22, 20.0.0–20.3.35, or 19.2.27 and earlier should check their Windows deployments.