Bug 2159291 (CVE-2023-0118)

Summary: CVE-2023-0118 Foreman: Arbitrary code execution through templates
Product: [Other] Security Response Reporter: ybuenos
Component: vulnerabilityAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aruzicka, bbuckingham, bcourt, ehelms, jsherril, lzap, mhulan, myarboro, nmoumoul, orabin, pcreech, rchan, ytale
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: foreman 6.13.3 Doc Type: If docs needed, set a value
Doc Text:
An arbitrary code execution flaw was found in Foreman. This flaw allows an admin user to bypass safe mode in templates and execute arbitrary code on the underlying operating system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-03 18:09:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2159414, 2159416, 2159417, 2159656, 2159659, 2239686    
Bug Blocks: 2152810    

Description ybuenos 2023-01-09 10:46:33 UTC
An admin user on Foreman can bypass safe mode in templates and execute arbitrary code via the Report Templates function. When changing the "template" JSON value in the POST request, an attacker can exploit the bind() call in safemode to inject an OS command in the underlying operating system.

Comment 7 errata-xmlrpc 2023-08-03 13:30:16 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.13 for RHEL 8

Via RHSA-2023:4466 https://access.redhat.com/errata/RHSA-2023:4466

Comment 8 Product Security DevOps Team 2023-08-03 18:09:19 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2023-0118

Comment 10 errata-xmlrpc 2023-10-20 18:43:14 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.12 for RHEL 8

Via RHSA-2023:5979 https://access.redhat.com/errata/RHSA-2023:5979

Comment 11 errata-xmlrpc 2023-10-20 18:43:56 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.11 for RHEL 7
  Red Hat Satellite 6.11 for RHEL 8

Via RHSA-2023:5980 https://access.redhat.com/errata/RHSA-2023:5980

Comment 12 errata-xmlrpc 2023-11-08 14:17:01 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.14 for RHEL 8

Via RHSA-2023:6818 https://access.redhat.com/errata/RHSA-2023:6818