CVE-2026-54268: Angular: Denial of Service (DoS) via OOM in Date Formatting (formatDate)

Published Jun 15, 2026
·
Updated

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: 1. Vulnerable Component Usage: The application must format dates using the formatDate utility or the DatePipe. 2. 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.

Other sources

Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.1, 21.2.17, and 20.3.25, 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). This vulnerability is fixed in 22.0.1, 21.2.17, and 20.3.25.

MITRE

Affected Software

8 affected componentsFixes available
npm/@angular/common<=19.2.25
npm/@angular/common>=20.0.0-next.0<20.3.25
20.3.25
npm/@angular/common>=21.0.0-next.0<21.2.17
21.2.17
npm/@angular/common>=22.0.0-next.0<22.0.1
22.0.1
angular Angular Node.js<=19.2.25
angular Angular Node.js>=20.0.0<20.3.25
angular Angular Node.js>=21.0.0<21.2.17
angular Angular Node.js>=22.0.0<22.0.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@angular/common to a version that resolves this vulnerability.

    Fixed in 20.3.25
  2. Upgrade

    Upgrade npm/@angular/common to a version that resolves this vulnerability.

    Fixed in 21.2.17
  3. Upgrade

    Upgrade npm/@angular/common to a version that resolves this vulnerability.

    Fixed in 22.0.1
  4. Upgrade

    Upgrade @angular/common to a version that resolves this vulnerability.

    Fixed in 22.0.1
  5. Upgrade

    Upgrade @angular/common to a version that resolves this vulnerability.

    Fixed in 21.2.17
  6. Upgrade

    Upgrade @angular/common to a version that resolves this vulnerability.

    Fixed in 20.3.25

Event History

Jun 15, 2026
Advisory Published
via GitHub·05:24 PM
Data Sourced
via GitHub·05:24 PM
DescriptionWeaknessAffected Software
Jun 22, 2026
CVE Published
via MITRE·03:31 PM
Data Sourced
via MITRE·03:31 PM
DescriptionWeakness
Data Sourced
via NVD·04:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-54268?

The severity of CVE-2026-54268 is assessed as risk level 30.

2

What type of vulnerability is CVE-2026-54268?

CVE-2026-54268 is a Denial of Service (DoS) vulnerability.

3

How can I fix CVE-2026-54268?

To fix CVE-2026-54268, update the `@angular/common` package to a secure version that addresses this vulnerability.

4

What impact does CVE-2026-54268 have on applications?

CVE-2026-54268 can cause applications using the `formatDate` function to become unresponsive due to unvalidated input.

5

Is CVE-2026-54268 related to Angular's DatePipe?

Yes, CVE-2026-54268 affects the `formatDate` function which is used by Angular's standard `DatePipe`.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203