Insecure Defaults Affecting ransack package, versions <4.0.0
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-RUBY-RANSACK-5776488
- published 14 Jul 2023
- disclosed 14 Jul 2023
- credit Lukas Euler, Positive Security
How to fix?
Upgrade ransack
to version 4.0.0 or higher.
Overview
Affected versions of this package are vulnerable to Insecure Defaults. The library poses a major security risk that can likely be exploited to extract sensitive information or fully compromise the application. An attacker is be able to perform character by character brute-force of arbitrary attributes on associated database objects.
Note:
An application is potentially vulnerable if it exposes a search/filtering function which processes an unrestricted query object, usually represented by a Ruby hash constructed via the q
GET parameter.
Workaround
Users who are unable to upgrade to the fixed version can restrict which associations and attributes are respected via a whitelist.