---
id: CVE-2026-96658
title: A flaw was found in Foreman
summary: >-
  A flaw was found in Foreman. An authenticated attacker with low-level
  permissions can achieve remote code execution (RCE) by bypassing the safemode
  sandbox within the templating engine. Due to improper handling of delegated
  methods, an a…
severity: critical
cvss: 9.9
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'
cwe:
  - CWE-94
vendor: Red Hat
product: rubygem-safemode
affected:
  - rubygem-safemode (all versions)
  - rubygem-safemode (all versions)
  - foreman (all versions)
  - python-dynaconf (all versions)
  - python-gitpython (all versions)
  - python-lxml (all versions)
  - python-sqlparse (all versions)
  - rubygem-foreman_remote_execution (all versions)
  - rubygem-hammer_cli (all versions)
  - rubygem-katello (all versions)
  - rubygem-safemode (all versions)
  - satellite (all versions)
  - yggdrasil-worker-forwarder (all versions)
  - rubygem-safemode (all versions)
  - foreman (all versions)
patched:
  - satellite_6_16_for_rhel 8
  - satellite_6_16_for_rhel 9
  - satellite_6_18_for_rhel 9
  - satellite_6_19_for_rhel 9
published: '2026-10-01'
updated: '2026-10-07'
sourceUpdated: '2026-10-07T07:17:02.280'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-96658'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2026:74503'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:74504'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:74505'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:74506'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/security/cve/CVE-2026-96658'
    label: secalert@redhat.com
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2534185'
    label: secalert@redhat.com
  - url: 'http://www.openwall.com/lists/oss-security/2026/10/07/2'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-96658.json
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-96658'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-96658'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-10-01T17:34:22.363598Z'
epss: 0.00724
epssPercentile: 0.53834
ingestedAt: '2026-10-01T18:55:42.366Z'
scores:
  nvd: 9.9
  cna: 8.8
  vendor: 8.8
---

## Overview

A flaw was found in Foreman. An authenticated attacker with low-level permissions can achieve remote code execution (RCE) by bypassing the safemode sandbox within the templating engine. Due to improper handling of delegated methods, an attacker can append unauthorized functions to the allowed execution list, enabling them to run arbitrary commands on the hosting server.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **RHSA-2026:74506** · Red Hat · fixed in: Red Hat Satellite 6.16 for RHEL 8, Red Hat Satellite 6.16 for RHEL 9 · released 2026-10-01 · [advisory](https://access.redhat.com/errata/RHSA-2026:74506)
- **RHSA-2026:74504** · Red Hat · fixed in: Red Hat Satellite 6.18 for RHEL 9 · released 2026-10-01 · [advisory](https://access.redhat.com/errata/RHSA-2026:74504)
- **RHSA-2026:74503** · Red Hat · fixed in: Red Hat Satellite 6.19 for RHEL 9 · released 2026-10-01 · [advisory](https://access.redhat.com/errata/RHSA-2026:74503)
- **RHSA-2026:74505** · Red Hat · fixed in: Red Hat Satellite 6.17 for RHEL 9 · released 2026-10-01 · [advisory](https://access.redhat.com/errata/RHSA-2026:74505)
