CVE-2026-33169
Regular Expression DoS in Active Support NumberToDelimitedConverter
Publication date: 2026-03-24
Last updated on: 2026-03-24
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| rubyonrails | rails | to 7.2.3.1 (exc) |
| rubyonrails | rails | From 8.0.0 (inc) to 8.0.4.1 (exc) |
| rubyonrails | rails | From 8.1.0 (inc) to 8.1.2.1 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-400 | The product does not properly control the allocation and maintenance of a limited resource. |
| CWE-1333 | The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-33169 is a Regular Expression Denial of Service (ReDoS) vulnerability in the Active Support component of the Ruby on Rails framework, specifically in the NumberToDelimitedConverter class. This class uses a regular expression with the gsub! method to insert thousands delimiters into numeric strings. Prior to patched versions, the interaction between the repeated lookahead group in the regex and gsub! can cause quadratic time complexity when processing long digit strings.
This means that when very long digit strings are processed, the method can take exponentially longer to complete, potentially allowing an attacker to degrade performance or cause a denial of service by supplying specially crafted input.
The vulnerability was fixed by optimizing the method to reduce reliance on regex substitutions, instead using manual string slicing and grouping to insert delimiters more efficiently.
How can this vulnerability impact me? :
This vulnerability can impact you by allowing an attacker to cause performance degradation or denial of service in applications using the affected versions of the Ruby on Rails Active Support component.
Specifically, if an application processes long numeric strings with the vulnerable number_to_delimited method, an attacker could supply specially crafted input that triggers the quadratic time complexity in the regex operation, leading to excessive CPU usage and slowing down or crashing the application.
This can result in reduced availability or responsiveness of your application, potentially affecting end users and system stability.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': "This vulnerability is related to a performance issue in the Ruby on Rails Active Support component's number formatting method, specifically the `NumberToDelimitedConverter` using a regex with `gsub!` that can cause quadratic time complexity on long digit strings."}, {'type': 'paragraph', 'content': 'To detect this vulnerability on your system, you should first identify if your Ruby on Rails application uses a vulnerable version of the Active Support library (versions prior to 8.1.2.1, 8.0.4.1, and 7.2.3.1).'}, {'type': 'paragraph', 'content': 'You can check the installed version of the Rails gem by running the following command in your application environment:'}, {'type': 'list_item', 'content': 'gem list rails'}, {'type': 'paragraph', 'content': 'Or check the version of activesupport specifically:'}, {'type': 'list_item', 'content': 'gem list activesupport'}, {'type': 'paragraph', 'content': 'If the version is within the vulnerable range, your system is potentially affected.'}, {'type': 'paragraph', 'content': 'To detect exploitation attempts or performance degradation caused by this vulnerability, monitor your application logs and performance metrics for unusually high CPU or memory usage when processing large numeric strings, especially if user input is involved in number formatting.'}] [2]
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to upgrade the Active Support component of your Ruby on Rails framework to a patched version where this vulnerability is fixed.
- Upgrade to version 8.1.2.1 or later if you are using the 8.1 series.
- Upgrade to version 8.0.4.1 or later if you are using the 8.0 series.
- Upgrade to version 7.2.3.1 or later if you are using the 7.2 series.
These versions contain the patch that optimizes the `NumberToDelimitedConverter` to avoid the quadratic time complexity caused by the regex with `gsub!`.
Additionally, consider monitoring and limiting the length of numeric strings processed by your application to reduce the risk of performance degradation.