safemode is vulnerable to Exposed Dangerous Method or Function
95
CVE Score
Critical
Exposed Dangerous Method or Function
Foreman passes user supplied provisioning templates through a safemode sandbox, and jailed Safemode::Scope and Safemode::Blankslate objects may call only the instance methods on a class level allow list. That list includes instance_variable_get, so a low privilege user who can edit or render templates can read instance variables on any reachable jailed value, including the unjailed source object and other sensitive state, and run arbitrary Ruby methods outside the sandbox. The fix removes instance_variable_get from Blankslate's @@allow_instance_methods and reads those variables in the unjail helper with an unbound Object#instance_variable_get (IVAR_GET.bind_call).
Upgrade the safemode package to version 2.0.1 or later.
You are affected if you are using a version that falls within the vulnerable range and are rendering Foreman templates evaluated through the Safemode sandboxing library.
0.0.2 - 2.0.0
Fixed in 2.0.1safemode is vulnerable to Exposed Dangerous Method or Function in versions 0.0.2 - 2.0.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.