Intel

AIKIDO-2026-183245

ransack is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-vxc9-rm8f-p56j Published 5 days ago

75

High Risk

This Affects:

RUBYransack
0.1.0 - 4.4.1
Fixed in 4.4.2
5.0.0 - 5.0.0
Fixed in 5.0.1
Are you affected? Scan for Free

TL;DR

Ransack's collapse_multiparameter_attributes! method in lib/ransack/search.rb assigns a user supplied multiparameter position value directly as an array index without validating its size. A crafted query key such as q[created_at(100000000000i)]=1 makes Ruby allocate an array of that size, consuming multiple gigabytes of RAM and crashing the worker process. Any endpoint that calls ransack on request parameters is reachable this way, giving an unauthenticated memory exhaustion denial of service from a single request. The fix validates the position index and rejects out of range values before allocation.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

ransack is vulnerable to Denial of Service (DoS) in versions 0.1.0 - 4.4.1 and 5.0.0 - 5.0.0.

How to fix this

Upgrade the ransack library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform