Bug 2236261 (CVE-2023-38037)

Summary: CVE-2023-38037 rubygem-activesupport: File Disclosure of Locally Encrypted Files
Product: [Other] Security Response Reporter: Chess Hazlett <chazlett>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: amasferr, bbuckingham, bcourt, chazlett, ehelms, jcantril, jsherril, lzap, mhulan, mkudlej, nmoumoul, orabin, pcreech, periklis, rchan, tjochec
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: activesupport 7.0.7.1, activesupport 6.1.7.5 Doc Type: If docs needed, set a value
Doc Text:
An insecure temporary file vulnerability was found in activesupport rubygem. Contents that will be encrypted are written to a temporary file that has the user’s current umask settings, possibly leading to information disclosure by other users on the same system.
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2236262, 2236263, 2236264    
Bug Blocks: 2236258    

Description Chess Hazlett 2023-08-30 20:16:23 UTC
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/CVE-2023-38037.yml
http://localhost:5600/static/#/asm_ticket/98986

CVE(s): CVE-2023-38037   There is a possible file disclosure of locally encrypted files in Active Support.

Versions Affected: >= 5.2.0
Not affected: < 5.2.0
Fixed Versions: 7.0.7.1, 6.1.7.5

# Impact
ActiveSupport::EncryptedFile writes contents that will be encrypted to a temporary file. The temporary file’s permissions are defaulted to the user’s current umask settings, meaning that it’s possible for other users on the same system to read the contents of the temporary file.

Attackers that have access to the file system could possibly read the contents of this temporary file while a user is editing it.

All users running an affected release should either upgrade or use one of the workarounds immediately.

# Releases
The fixed releases are available at the normal locations.

# Workarounds
To work around this issue, you can set your umask to be more restrictive like this:

```ruby
$ umask 0077
```

Comment 3 errata-xmlrpc 2023-12-13 18:42:43 UTC
This issue has been addressed in the following products:

  RHOL-5.8-RHEL-9

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

Comment 4 errata-xmlrpc 2024-01-17 10:30:06 UTC
This issue has been addressed in the following products:

  RHOL-5.7-RHEL-8

Via RHSA-2024:0268 https://access.redhat.com/errata/RHSA-2024:0268

Comment 5 errata-xmlrpc 2024-04-23 17:14:12 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.15 for RHEL 8

Via RHSA-2024:2010 https://access.redhat.com/errata/RHSA-2024:2010