Bug 2547645 (CVE-2026-107360) - CVE-2026-107360 rubygem-safemode: safemode: Jail allow-list bypass via op-assign expressions
Summary: CVE-2026-107360 rubygem-safemode: safemode: Jail allow-list bypass via op-ass...
Keywords:
Status: NEW
Alias: CVE-2026-107360
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-10-07 20:08 UTC by OSIDB Bzimport
Modified: 2026-11-12 18:47 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-10-07 20:08:58 UTC
A flaw was found in rubygem-safemode. The parser allows op-assign AST nodes (op_asgn2, op_asgn_or, op_asgn_and, safe_op_asgn2, op_asgn1) without inserting .to_jail on the receiver, so compound assignment expressions such as x.foo ||= v, x.foo &&= v, x.foo += v, and x[k] += v execute getters, setters, and index operators directly on the real object. This completely bypasses the Jail method allow-list that is intended to mediate all method calls in sandboxed template code. An authenticated user who can influence Foreman/Satellite template content can invoke arbitrary no-argument methods on unjailed render-scope objects — including Host#destroy, which Host::Jail deliberately excludes — as well as disclose Jail-excluded getters and write through setters. Because the receiver is not jailed, other zero-argument ActiveRecord methods (for example attributes) are expected to be similarly reachable.

Reported via foreman-security / PSIRTSUPT-25192 (coordination) and PSIRTSUPT-25106 (initial forward). Credit: Kaya Emre Arikan (GitHub @kemrec). Confirmed by Foreman Security (Lukas Zapletal): a template-only user can call @host.destroy and delete the host record.


Note You need to log in before you can comment on or make changes to this bug.