CVE-2026-54268
@angular/common: Denial of Service (DoS) via OOM in Date Formatting (formatDate)
Description
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.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm.at.angular » commonvia npm @angular/common | <= 19.2.25>= 20.0.0-next.0, < 20.3.25>= 21.0.0-next.0, < 21.2.17>= 22.0.0-next.0, < 22.0.1 | 20.3.25, 21.2.17, 22.0.1 |
| org.webjars.npm » angular__commonvia npm @angular/common | <= 19.2.25>= 20.0.0-next.0, < 20.3.25>= 21.0.0-next.0, < 21.2.17>= 22.0.0-next.0, < 22.0.1 | 20.3.25, 21.2.17, 22.0.1 |
Blast radius
35% of the dependent artifacts (7) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 370 |
| 2 hops | 9 |
| 3 hops | 9 |
Most used dependents
- org.mvnpm.at.angular » platform-browser10 usages
- org.mvnpm.at.angular » forms5 usages
- org.mvnpm.at.angular » router4 usages
- org.mvnpm.at.angular » platform-browser-dynamic3 usages
- org.mvnpm.at.angular » animations2 usages
- org.fujion » fujion-angular-core2 usages
- org.fujion » fujion-angular-example1 usages
- org.fujion » fujion-testharness0 usages
- org.webjars.npm » github-com-ng-bootstrap-ng-bootstrap0 usages
- org.webjars.npm » ng2-datetime0 usages
- org.webjars.npm » ng2-datetime-picker0 usages
- org.webjars.npm » github-com-angular-material20 usages
- org.mvnpm » a2ui0 usages
- org.webjars.npm » angular2-fontawesome0 usages
- org.webjars.npm » github-com-mseemann-angular2-mdl0 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2026-54268 | nvd.nist.gov |
| Package | angular/angular | github.com |
| Web | angular/angular advisory GHSA-48r7-hpm6-gfxm | github.com |
| Web | angular/angular pull request #69197 | github.com |
| Web | angular/angular commit eeb03f4 | github.com |
