CVE-2026-50171: Angular formatNumber DoS Vulnerability – CVSS 6.1 Medium
Angular applications using number formatting features are vulnerable to a denial-of-service attack if an attacker can control the formatting instructions passed to number-display functions. An attacker crafting specially designed format strings with extremely large digit specifications can cause the application to enter an infinite loop that consumes memory and CPU, effectively freezing or crashing the app. This affects Angular's number, decimal, percent, and currency formatting pipes—features commonly used to display financial data, statistics, and user-facing numbers.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.1 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-400, CWE-834
- Affected products
- 16 configuration(s)
- Published / Modified
- 2026-06-22 / 2026-07-09
NVD description (verbatim)
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23, 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. This vulnerability is fixed in 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in Angular's @angular/common package, specifically in the formatNumber function and its downstream consumers (DecimalPipe, PercentPipe, CurrencyPipe). The digitsInfo parameter (e.g., '1.2-4' meaning 1 integer digit and 2–4 fraction digits) lacks upper-bound validation. When a malicious digitsInfo string specifies extremely large maximum fraction values (e.g., '1.200000000-200000000'), the internal roundNumber function attempts to pad a digits array to accommodate all requested fractional positions. This triggers an unbounded loop that repeatedly appends elements to the array, causing resource exhaustion. The vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-834 (Excessive Iteration).
Business impact
Applications relying on Angular's formatting pipes to display numeric content (pricing, analytics dashboards, financial portals, reporting systems) can be remotely crashed by attackers who control input data or template expressions. The attack requires user interaction (clicking a link, viewing a crafted page) but does not require authentication. Availability impact ranges from temporary unresponsiveness to complete application failure, disrupting user productivity and potentially affecting downstream services that depend on the affected application.
Affected systems
Angular applications running versions prior to 22.0.0-rc.2 (v22 branch), 21.2.15 (v21 branch), 20.3.22 (v20 branch), and 19.2.23 (v19 branch) are affected. Any application using @angular/common's formatNumber function, DecimalPipe, PercentPipe, or CurrencyPipe in templates or component code is in scope if user-controlled or untrusted data flows into the digitsInfo parameter.
Exploitability
Exploitability is straightforward if an attacker can influence the digitsInfo format string. Attack vectors include: (1) crafted query parameters or URL fragments binding to template pipes, (2) untrusted data from APIs or external sources displayed via pipes, (3) social engineering to visit a malicious page hosting an Angular application with injected formatting directives. The CVSS vector (AV:N/AC:L/PR:N/UI:R) reflects network accessibility, low complexity, no privileges required, but requires user interaction. This is not an exploitation that occurs silently in the background.
Remediation
Update Angular to version 22.0.0-rc.2 or later (v22 stable when released), 21.2.15, 20.3.22, or 19.2.23. These versions include validation to enforce reasonable upper bounds on digitsInfo parameters, preventing unbounded array padding. Applications should also audit template expressions and component code to avoid binding user input directly to the digitsInfo parameter of number pipes; apply input sanitization and schema validation where appropriate.
Patch guidance
Upgrade @angular/common via npm: 'npm install @angular/<package>@latest' or specify the patched version directly (e.g., '@angular/[email protected]'). Verify your package.json and package-lock.json reflect the new version. If you are on v19, v20, or v21, select the appropriate patch release. Test formatting pipes with your existing numeric data to ensure no regressions in decimal or currency display. For monorepo setups, ensure all Angular packages are updated together to maintain compatibility.
Detection guidance
Monitor application logs for excessive memory growth or CPU spikes correlating with number formatting operations. In development, add logging to digitsInfo inputs before they reach pipes to identify unusually large digit specifications. Use Angular's built-in change detection profiling to detect unexplained reflows or loops. Network-level detection is limited; focus on application-level alerts for slow response times or crashes following requests with unusual formatting parameters. Consider implementing Content Security Policy (CSP) to restrict script execution and reduce the attack surface if third-party content is rendered.
Why prioritize this
Although the CVSS score of 6.1 (MEDIUM) reflects the need for user interaction, the ease of exploitation and potential for widespread denial of service in customer-facing applications warrants rapid patching. Angular is widely used in enterprise and SaaS environments. The fix is available and straightforward to deploy. Organizations should prioritize this update within a normal patch cycle, especially if applications expose number formatting to untrusted input.
Risk score, explained
CVSS 6.1 (MEDIUM) combines moderate severity (availability impact, some confidentiality/integrity side-effects per the vector) with low attack complexity and no privilege requirements. The user interaction requirement (clicking a link, loading a page) prevents a higher score, but the network-accessible nature and ease of triggering the flaw via simple parameter manipulation keep it above LOW. In environments where Angular apps are internet-facing or serve untrusted users, practical risk is elevated.
Frequently asked questions
Can this vulnerability be exploited without user interaction?
No. The CVSS vector specifies UI:R (user interaction required). An attacker must craft a malicious link, page, or data payload that a user clicks or loads. Silent, background exploitation is not possible with this vulnerability.
What is the difference between this and a standard regex denial-of-service (ReDoS)?
This is not a regex issue. It is an algorithmic denial of service in the roundNumber function's array padding logic. The vulnerability arises from missing bounds checking on parsed digit parameters, not pattern matching. The attack is simpler: provide a format string with enormous digit counts and trigger the loop.
Do I need to update all Angular packages or just @angular/common?
You should update all @angular/* packages together for the same version to maintain compatibility. The fix is in @angular/common, but updating the entire framework to the patched version ensures consistency and avoids potential conflicts.
Can input validation in my application mitigate this vulnerability?
Yes, if you control the source of digitsInfo parameters. Validate and whitelist allowed format strings (e.g., '1.2-4', '2.1-3') and reject any digitsInfo values with unreasonably large numbers. However, upgrading Angular is the definitive fix and is still recommended.
This analysis is provided for informational purposes. CVE-2026-50171 is a future or hypothetical CVE reference used for demonstration. Verify all patch versions and affected product details against official Angular security advisories and the National Vulnerability Database. SEC.co does not provide legal or compliance advice; consult your security policy and vendor documentation before deploying patches. Test updates in a non-production environment first. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-45680MEDIUMOpenTelemetry eBPF Instrumentation CPU Exhaustion DoS
- CVE-2026-54268HIGHAngular DatePipe Denial of Service – High CVSS 7.5
- CVE-2019-25721MEDIUMDräger Infinity M300 Denial-of-Service Vulnerability – Network-Induced Device Reboots
- CVE-2019-25724MEDIUMDräger Infinity M300 Denial-of-Service Vulnerability Impact on Patient Monitoring
- CVE-2025-48648MEDIUMAndroid NotificationManagerService Resource Exhaustion DoS
- CVE-2026-0042MEDIUMAndroid UBSan Resource Exhaustion Denial of Service
- CVE-2026-0064MEDIUMAndroid Resource Exhaustion Denial of Service
- CVE-2026-0069MEDIUMAndroid Resource Exhaustion in APK Signature Verification