---
id: "CVE-2026-107360"
page: "https://infrastack.ai/live/CVE-2026-107360"
kind: "vulnerability"
aliases: ["CVE-2026-107360"]
title: "rubygem-safemode: compound assignment bypasses Jail allow-list in templates"
severity: "critical"
cvss: 9.6
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "safemode", "fixed": [], "affected": "unknown, no fixed version published", "ecosystem": "rubygems"}, {"name": "Red Hat Satellite 6", "fixed": [], "affected": "affected per Red Hat, versions unspecified", "ecosystem": "vendor"}]
ecosystems: []
tags: ["auth-required", "foreman", "package", "red-hat-satellite", "ruby", "rubygems", "safemode", "self-hosted"]
not_affected_if: ["no-user-templates", "safemode-not-used", "trusted-template-authors-only"]
published_at: "2026-11-12T20:18:14+00:00"
first_seen_at: "2026-11-12T20:40:22+00:00"
updated_at: "2026-11-12T20:44:10+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-107360", "first_seen_at": "2026-11-12T20:40:22+00:00"}, {"source": "analyst", "url": "https://access.redhat.com/security/cve/CVE-2026-107360", "first_seen_at": "2026-11-12T20:44:10+00:00", "cites": ["https://access.redhat.com/security/cve/CVE-2026-107360", "https://bugzilla.redhat.com/show_bug.cgi?id=2547645"]}]
exploit_sources: []
---

# rubygem-safemode: compound assignment bypasses Jail allow-list in templates

Link for people: https://infrastack.ai/live/CVE-2026-107360 (this .md is for agents)

safemode is a Ruby gem that runs untrusted template code inside a sandbox. Compound assignment expressions skip the Jail allow-list check, so an authenticated user who can supply template content can call arbitrary no-argument methods on exposed objects, including destructive ones and reads of non-allow-listed state.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- rubygems:safemode affected unknown, no fixed version published fixed no fixed version listed
- vendor:Red Hat Satellite 6 affected affected per Red Hat, versions unspecified fixed no fixed version listed

## How to check

Check Gemfile.lock for safemode (bundle list | grep safemode; on Foreman/Satellite: rpm -q rubygem-safemode). Then see whether untrusted users can edit templates (Foreman: roles with edit_provisioning_templates etc.). No fixed version is published, so any version in use should be treated as exposed.

## Fix

unknown: no fixed safemode release published yet (Red Hat Bugzilla status NEW). Mitigation: restrict template edit privileges to trusted administrators and avoid exposing privileged ActiveRecord objects to untrusted template authors.

## Timeline

- 2026-11-12T20:40:22+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-107360
- 2026-11-12T20:44:10+00:00 analyst https://access.redhat.com/security/cve/CVE-2026-107360 — Red Hat CVE page + Bugzilla 2547645 (status NEW, no fixed version): op_asgn AST nodes skip .to_jail; needs authenticated low-priv template editor (PR:L); Foreman/Satellite confirmed (@host.destroy). No fixed safemode version published as of 2026-11-12; affected range unknown. Separate from CVE-2026-96658 (fixed in safemode 2.0.1), do not assume 2.0.1 fixes this.

## Documents

- [advisory] Red Hat CVE-2026-107360 https://access.redhat.com/security/cve/CVE-2026-107360
- [describes] Red Hat Bugzilla 2547645: safemode Jail allow-list bypass via op-assign https://bugzilla.redhat.com/show_bug.cgi?id=2547645

## From the sources

A flaw was found in rubygem-safemode. Compound assignment expressions in sandboxed code are evaluated without mediating method calls through the Jail allow-list. An authenticated attacker who can supply template content can invoke arbitrary no-argument methods on objects exposed to the template renderer without Jail mediation, including destructive operations such as host deletion and disclosure of non-allow-listed object state.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
