Arbitrary Code Injection Affecting rack package, versions <2.0.9.1>=2.1.0, <2.1.4.1>=2.2.0, <2.2.3.1


Severity

Recommended
0.0
critical
0
10

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

Threat Intelligence

EPSS
0.56% (79th 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-RACK-2848599
  • published28 May 2022
  • disclosed28 May 2022
  • creditvairelt

Introduced: 28 May 2022

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

How to fix?

Upgrade rack to version 2.0.9.1, 2.1.4.1, 2.2.3.1 or higher.

Overview

rack is a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.

Affected versions of this package are vulnerable to Arbitrary Code Injection. There is a possible shell-escape sequence injection vulnerability in Rack's Lint and CommonLogger components. Carefully crafted requests can cause shell escape sequences to be written to the terminal via Rack's Lint middleware and CommonLogger middleware. These escape sequences can be leveraged to possibly execute commands in the victim's terminal.

Notes:

Impacted applications will have either of these middleware installed, and vulnerable apps may have something like this:use Rack::Lint or use Rack::CommonLogger.

CVSS Scores

version 3.1