CVE-2026-33169

Rails Active Support has a possible ReDoS vulnerability in number_to_delimited

Published Mar 23, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
Active Support is a toolkit of support libraries and Ruby core extensions extracted from the Rails framework. `NumberToDelimitedConverter` uses a lookahead-based regular expression with `gsub!` to insert thousands delimiters. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, the interaction between the repeated lookahead group and `gsub!` can produce quadratic time complexity on long digit strings. Versions 8.1.2.1, 8.0.4.1, and 7.2.3.1 contain a patch.

Analysis

AI-generated

Technical impact

The vulnerability resides in ActiveSupport’s NumberToDelimitedConverter, which uses a lookahead‑based regular expression with gsub! to add thousands delimiters. The combination of the repeated lookahead group and the in‑place gsub! call can trigger quadratic time complexity when processing long digit strings. As the input grows, the number of regex operations grows faster than linear, leading to excessive CPU usage and potential denial of service. This is a classic case of resource exhaustion (CWE‑400) coupled with a regex backtracking flaw (CWE‑1333).

Affected Systems

The issue is present in the Rails ActiveSupport library shipped with the Rails framework. It affects all Rails releases prior to 8.1.2.1, 8.0.4.1, and 7.2.3.1. Those earlier versions will handle numbers containing long numeric sequences with the vulnerable regex, whereas the patched releases have fixed the regex pattern to avoid the quadratic behavior.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate severity, while the EPSS score of less than 1% suggests low current exploit probability. The vulnerability is not listed in the CISA KEV catalog. The attack vector likely involves supplying a very long numeric string to any code path that calls number_to_delimited, such as form inputs, API payloads, or templating helper calls. An attacker with the ability to send such input can cause the Ruby interpreter to consume large amounts of CPU time, potentially leading to service degradation or crash if resources are exhausted.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Rails to ActiveSupport version 8.1.2.1, 8.0.4.1, or 7.2.3.1 or later.
  • If upgrade is not immediately possible, limit the length of numeric inputs that can be processed by number_to_delimited, e.g., reject strings greater than a few hundred characters.
  • Sanitize or validate user input to prevent excessively long number strings before they reach the converter.
  • Verify that the patched commits (29154f1, b54a4b3, ec1a0e2) have been applied if you are using a forked or custom Rails distribution.
  • Monitor application performance for abnormal CPU spikes that might indicate an attack using this vulnerability.

Generated by OpenCVE AI on March 24, 2026 at 19:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4829-1 rails security update
Debian DSA Debian DSA DSA-6546-1 rails security update
Github GHSA Github GHSA GHSA-cg4j-q9v8-6v38 Rails Active Support has a possible ReDoS vulnerability in number_to_delimited
History
Type Values Removed Values Added
First Time appeared Rubyonrails
Rubyonrails rails
CPEs cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*
Vendors & Products Rubyonrails
Rubyonrails rails
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H'}

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Rails
Rails activesupport
Vendors & Products Rails
Rails activesupport
Type Values Removed Values Added
Description Active Support is a toolkit of support libraries and Ruby core extensions extracted from the Rails framework. `NumberToDelimitedConverter` uses a lookahead-based regular expression with `gsub!` to insert thousands delimiters. Prior to versions 8.1.2.1, 8.0.4.1, and 7.2.3.1, the interaction between the repeated lookahead group and `gsub!` can produce quadratic time complexity on long digit strings. Versions 8.1.2.1, 8.0.4.1, and 7.2.3.1 contain a patch.
Title Rails Active Support has a possible ReDoS vulnerability in number_to_delimited
Weaknesses CWE-1333
CWE-400
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 24, 2026, 3:46 PM
Reserved
Mar 17, 2026, 9:17 PM
Status
Analyzed
Published
Mar 24, 2026, 12:16 AM
Modified
Jun 17, 2026, 10:37 AM
Severity
Moderate
Public date
Mar 23, 2026, 11:07 PM