home / blog

2026-11-13 · critical

CVE-2026-107360: Jail Bypass in rubygem-safemode

Critical Jail bypass: authenticated template authors delete hosts and read data in Foreman/Satellite.

CVE-2026-107360: Jail Bypass in rubygem-safemode

CVE-2026-107360 identifies a critical vulnerability in the sandboxing of rubygem-safemode, a Ruby gem implementing the Jail sandbox for secure template execution. The flaw lies in how compound assignment expressions (+=, -=, ||=) are processed: they are not mediated through the Jail allow-list, allowing an authenticated attacker controlling template content to arbitrarily invoke argument-less methods on any exposed object, including destructive operations such as host deletion. The defect directly impacts Foreman and Red Hat Satellite, critical platforms for infrastructure management.

The vulnerability carries a CVSS of 9.6, classified as critical. Technical evidence of exploit has been confirmed in lab on version 2.0.3 per GitHub signals. The attack vector requires authentication level (template author) but once obtained allows near-total control over template behavior. Execution of the bypass has been documented and an official fix has been proposed via PR #75 in the project's public repository.

Priority defensive actions are: 1) Update rubygem-safemode to the patched version as soon as available (after 2.0.3). 2) Restrict template author role access in Foreman/Satellite to trusted users only; audit who currently holds this permission. 3) Review template modification logs over recent days for suspicious templates creating or deleting hosts. 4) If immediate patching is not possible, disable template usage until the patch is available.

At a glance

What
Flaw in rubygem-safemode sandboxing: compound assignment expressions (+=, -=, ||=) in template code bypass the Jail allow-list mediation, allowing sandbox circumvention.
Severity
CVSS 9.6 (critical). Allows an authenticated attacker to invoke arbitrary methods on exposed objects without control, including destructive operations such as host deletion.
Affected versions
rubygem-safemode version 2.0.3 and earlier. Foreman and Red Hat Satellite using this gem are affected.
Fix
Patch available. PR #75 in rubygem-safemode repository fixes the bypass by mediating compound assignments. Update to version after 2.0.3.
Status
CVE published 12 November 2026. Exploit confirmed in lab on version 2.0.3 per GitHub evidence.
Action
Update rubygem-safemode immediately. Verify template author access in Foreman/Satellite. Review template modification logs in recent days.

Sources: NVD, CVE-2026-107360

← All articles