All rules →
Rules / Ruby
SHIELD-RUBY-022

Remote code execution via constantize with user input

highRubyCWE-470CVSS 8.1

What it detects

Calling constantize or qualified_const_get on params can instantiate unintended classes.

How to fix

Map user input to allowed classes through an explicit whitelist rather than constantize.

Scan your repo freeFull documentation
Back to all rules
SHIELD-RUBY-022: Remote code execution via constantize with user input — Zennoxa Shield