Bug 2064747 (CVE-2022-21831)

Summary: CVE-2022-21831 rubygem-activestorage: Code injection vulnerability in ActiveStorage
Product: [Other] Security Response Reporter: Patrick Del Bello <pdelbell>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: bbuckingham, bcourt, ehelms, jsherril, lzap, mhulan, nmoumoul, orabin, pcreech, rchan, ruby-packagers-sig, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rails-7.0.2.3, rails-6.1.4.7, rails-6.0.4.7, rails-5.2.6.3 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Active Storage module of Rails, where the transformation method or its arguments for image_processing are not trusted arbitrary input. This flaw allows an attacker to inject code in Rails.
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: 2064748, 2066631, 2066632, 2066633    
Bug Blocks: 2064750    

Description Patrick Del Bello 2022-03-16 13:28:36 UTC
There is a possible code injection vulnerability in the Active Storage module
of Rails.  This vulnerability impacts applications that use Active Storage
with the image_processing processing in addition to the mini_magick back end
for image_processing.

Vulnerable code will look something similar to this:

```ruby
<%= image_tag blob.variant(params[:t] => params[:v]) %>
```

Where the transformation method or its arguments are untrusted arbitrary
input.


Versions Affected:  >= 5.2.0
  Not affected:       < 5.2.0
  Fixed Versions:     7.0.2.3, 6.1.4.7, 6.0.4.7, 5.2.6.3


References: 
https://github.com/advisories/GHSA-w749-p3v6-hccq

Comment 1 Patrick Del Bello 2022-03-16 13:28:53 UTC
Created rubygem-activestorage tracking bugs for this issue:

Affects: fedora-all [bug 2064748]