Arbitrary Code Injection Affecting activestorage package, versions >=5.2.0, <5.2.6.3>=6.0.0, <6.0.4.7>=6.1.0, <6.1.4.7>=7.0.0, <7.0.2.3


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
1.01% (84th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-ACTIVESTORAGE-2420035
  • published9 Mar 2022
  • disclosed9 Mar 2022
  • creditgquadros, Zack Deveau

Introduced: 9 Mar 2022

CVE-2022-21831  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade activestorage to version 5.2.6.3, 6.0.4.7, 6.1.4.7, 7.0.2.3 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Injection where the transformation method or its arguments are untrusted arbitrary input.

Note:

This vulnerability impacts applications that use Active Storage with the image_processing processing in addition to the mini_magick back end for image_processing.

PoC:

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

CVSS Scores

version 3.1