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.
Published Jun 15, 2026 · Updated Jul 15, 2026
Affected packages
@angular/common
- Ecosystem
- npm
- Affected
- >= 22.0.0-next.0, < 22.0.1
- Fixed in
- 22.0.1
- Check
npm ls @angular/common
@angular/common
- Ecosystem
- npm
- Affected
- >= 21.0.0-next.0, < 21.2.17
- Fixed in
- 21.2.17
- Check
npm ls @angular/common
@angular/common
- Ecosystem
- npm
- Affected
- >= 20.0.0-next.0, < 20.3.25
- Fixed in
- 20.3.25
- Check
npm ls @angular/common
@angular/common
- Ecosystem
- npm
- Affected
- <= 19.2.25
- Fixed in
- No patched version yet
- Check
npm ls @angular/common
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
- 22.0.1
- 21.2.17
- 20.3.25
Attack Preconditions
For this vulnerability to be exploitable, both of the following conditions must be met:
- Vulnerable Component Usage: The application must format dates using the
formatDateutility or theDatePipe. - Attacker-Controlled Parameter: The date format string passed to these utilities must be customizable or directly controlled by untrusted user input (e.g., parsed from query parameters, user preferences, or API responses).
*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.*
Credited to JeanMeche, alan-agius4, SkyZeroZx, josephperrott.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-111753
@angular/common: XSRF Token Leakage via URL Parsing Discrepancy in Angular HTTP Client (Incomplete fix for CVE-2025-66035)
medium5.9No fixOct 20, 2026CVE-2026-88059
Angular: Information Leak via `HttpTransferCache` Bypass When Using `withRequestsMadeViaParent`
medium4.0No fixSep 10, 2026CVE-2026-68945
Angular: Cache-Key Ambiguity in HttpTransferCache Leading to Cross-Request Response Reuse and State Poisoning
high8.8No fixAug 3, 2026CVE-2026-50170
@angular/common: Information Leak via Default Caching of Credentialed Requests in HttpTransferCache
high7.5No fixJun 15, 2026CVE-2026-50171
@angular/common: Denial of Service (DoS) via OOM in Number Formatting (digitsInfo)
high6.1No fixJun 15, 2026CVE-2026-54266
@angular/common: Weak 32-Bit Cache Key Hashing in `HttpTransferCache` Leading to Cross-Request Data Leakage and State Poisoning
high6.1No fixJun 15, 2026
