Intel

AIKIDO-2026-598305

safemode is vulnerable to Exposed Dangerous Method or Function

CVE-2026-96658Published Oct 26, 2026
October 26, 2026

95

CVE Score

Critical

Exposed Dangerous Method or Function

Are you affected? Scan for Free

TL;DR

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).

How do I fix this?

Upgrade the safemode package to version 2.0.1 or later.

Who does this affect?

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.

Package

Versions

0.0.2 - 2.0.0

Fixed in 2.0.1

Background info

safemode is vulnerable to Exposed Dangerous Method or Function in versions 0.0.2 - 2.0.0.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea