Intel

AIKIDO-2026-317476

@angular/ssr is vulnerable to Path Traversal

Path TraversalGHSA-7g7c-h8rr-7p6q Published 2 days ago

63

Medium Risk

This Affects:

JS@angular/ssr
17.0.0 - 20.3.35
Fixed in 20.3.36
21.0.0 - 21.2.22
Fixed in 21.2.23
22.0.0 - 22.1.6
Fixed in 22.1.7
Are you affected? Scan for Free

TL;DR

CommonEngine in @angular/ssr serves prerendered SSG pages by joining the request pathname onto the configured public directory and checking containment with a startsWith prefix comparison. On Windows a request pathname containing backslash traversal sequences such as ..\ escapes the intended public directory, and the prefix comparison also treats sibling directories whose names share a prefix (for example dist\app-admin when dist\app is the public root) as contained. This lets a request read prerendered index.html files from outside the intended output directory. The fix replaces the prefix check with a path.relative() computation that rejects parent traversal and absolute results.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application serves prerendered pages through CommonEngine on a Windows host.

Background info

@angular/ssr is vulnerable to Path Traversal in versions 17.0.0 - 20.3.35, 21.0.0 - 21.2.22 and 22.0.0 - 22.1.6.

How to fix this

Upgrade the @angular/ssr library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform