Summary
@angular/common: Denial of Service (DoS) via OOM in Number Formatting (digitsInfo)
A Denial of Service (DoS) vulnerability exists in the @angular/common package of Angular. The formatNumber function, which is also utilized by DecimalPipe, PercentPipe, and CurrencyPipe, does not properly validate the upper bounds of the digitsInfo parameter. Specifically, the minimum and maximum fraction digits parsed from the digitsInfo string (e.g., 1.2-4) are converted to integers and used without limits.
When parsing a maliciously crafted digitsInfo string with excessively large fraction digit values (e.g., 1.200000000-200000000), the internal roundNumber function attempts to pad the digits array to match the requested fraction size. This results in an unbounded loop that repeatedly pushes elements into an array.
Attack Preconditions
For this vulnerability to be exploitable, the following conditions must be met:
- Vulnerable Component Usage: The application must use Angular's number formatting utilities, such as the
formatNumberfunction directly, or via template pipes (DecimalPipe,PercentPipe,CurrencyPipe). - Attacker-Controlled Parameter: The
digitsInfoparameter passed to these utilities must be customizable or directly controlled by untrusted user input (e.g., parsed from query parameters, user preference settings, or API responses that accept user-defined formatting options). IfdigitsInfois trusted or limited to a known, defined range for its value, the vulnerability is not exploitable by external attackers.
Credits
This vulnerability was discovered and reported by CodeMender from Google DeepMind.
Impact
Successful exploitation of this vulnerability allows an attacker to trigger resource exhaustion, leading to a Denial of Service (DoS):
- Server-Side Rendering (SSR): In applications using SSR (e.g.,
@angular/ssr), an attacker can crash the Node.js server process due to aJavaScript heap out of memoryerror. This affects the availability of the application for all users. - Client-Side Rendering (CSR): In standard client-side applications, the unbounded loop will block the main thread, freezing the user's browser tab and making it unresponsive.
Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service. Typical impact: denial of service.
CVE-2026-50171 has a CVSS score of 6.1 (High). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (22.0.0-rc.2, 20.3.22, 19.2.23, 21.2.15); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
- 22.0.0-rc.2
- 21.2.15
- 20.3.22
- 19.2.23
Frequently Asked Questions
- What is CVE-2026-50171? CVE-2026-50171 is a high-severity uncontrolled resource consumption vulnerability in @angular/common (npm), affecting versions >= 22.0.0-next.0, < 22.0.0-rc.2. It is fixed in 22.0.0-rc.2, 20.3.22, 19.2.23, 21.2.15. Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service.
- How severe is CVE-2026-50171? CVE-2026-50171 has a CVSS score of 6.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of @angular/common are affected by CVE-2026-50171? @angular/common (npm) versions >= 22.0.0-next.0, < 22.0.0-rc.2 is affected.
- Is there a fix for CVE-2026-50171? Yes. CVE-2026-50171 is fixed in 22.0.0-rc.2, 20.3.22, 19.2.23, 21.2.15. Upgrade to this version or later.
- Is CVE-2026-50171 exploitable, and should I be worried? Whether CVE-2026-50171 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-50171 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-50171?
- Upgrade
@angular/commonto 22.0.0-rc.2 or later - Upgrade
@angular/commonto 20.3.22 or later - Upgrade
@angular/commonto 19.2.23 or later - Upgrade
@angular/commonto 21.2.15 or later
- Upgrade