@angular/common
Affected
- introduced
22.0.0-next.0, fixed22.0.1(semver)
Fixed versions
22.0.1
Fix
- Fixed version
22.0.1npm install @angular/[email protected]
Advisory
Also known as: CVE-2026-54268
@angular/common: Denial of Service (DoS) via OOM in Date Formatting (formatDate)
A Denial of Service (DoS) vulnerability exists in the @angular/common package of the Angular framework. The formatDate function, which is also utilized by the standard Angular DatePipe, does not properly limit or validate the length of the format parameter.
When parsing a maliciously crafted, excessively long date format string (e.g., a repeating pattern or very large string), the internal parser splits the string iteratively using a regular expression loop. This results in uncontrolled resource consumption (high CPU utilization and excessive memory allocations), leading to a Denial of Service (DoS).
Impact
1. Server-Side Rendering (SSR)
In Angular applications that leverage Server-Side Rendering, an attacker can supply a malicious payload with an excessively long date format string. Processing this on the server causes high CPU usage and triggers a JavaScript heap out of memory crash, rendering the application unavailable to all users.
2. Client-Side Rendering (CSR)
In standard client-side applications, executing the vulnerable function with an excessively long format string blocks the browser's main thread, causing the browser tab to freeze and become completely unresponsive.
Patched Versions
Attack Preconditions
For this vulnerability to be exploitable, both of the following conditions must be met:
formatDate utility or the DatePipe.*If the date format is hardcoded (e.g., 'mediumDate', 'shortTime', or static strings) or properly validated to be within a reasonable length limit, the application is not vulnerable.*
High Basis: The source's own band: HIGH
22.0.0-next.0, fixed 22.0.1 (semver)22.0.1
22.0.1npm install @angular/[email protected]21.0.0-next.0, fixed 21.2.17 (semver)21.2.17
21.2.17npm install @angular/[email protected]20.0.0-next.0, fixed 20.3.25 (semver)20.3.25
20.3.25npm install @angular/[email protected]0, last affected 19.2.25 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0