Arbitrary Code Injection Affecting rack package, versions <18.104.22.168 >=2.1.0, <22.214.171.124 >=2.2.0, <126.96.36.199
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?
rack to version 188.8.131.52, 184.108.40.206, 220.127.116.11 or higher.
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
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.
Impacted applications will have either of these middleware installed, and vulnerable apps may have something like this:
use Rack::Lint or