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


0.0
critical

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Integrity High
    Availability High

    Threat Intelligence

    EPSS 0.3% (70th percentile)
Expand this section
NVD
10 critical
Expand this section
SUSE
9.8 critical
Expand this section
Red Hat
10 critical

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 ID SNYK-RUBY-RACK-2848599
  • published 28 May 2022
  • disclosed 28 May 2022
  • credit vairelt

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.