# \[CVE-2022-30123\] Possible shell escape sequence injection vulnerability in Rack

**URL:** <https://discuss.rubyonrails.org/t/cve-2022-30123-possible-shell-escape-sequence-injection-vulnerability-in-rack/80728>\
**Category:** Security Announcements\
**Tags:** security, rack, announcement\
**Created:** [May 27, 2022, 4:02pm UTC](https://discuss.rubyonrails.org/t/cve-2022-30123-possible-shell-escape-sequence-injection-vulnerability-in-rack/80728 "2022-05-27T16:02:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tenderlove](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/tenderlove/32/3541_2.png) [@tenderlove](https://discuss.rubyonrails.org/u/tenderlove)\
**Post date:** [May 27, 2022, 4:02pm UTC](https://discuss.rubyonrails.org/t/cve-2022-30123-possible-shell-escape-sequence-injection-vulnerability-in-rack/80728/1 "2022-05-27T16:02:30Z")

</div>

There is a possible shell escape sequence injection vulnerability in the Lint and CommonLogger components of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-30123.

Versions Affected: All. Not affected: None Fixed Versions: 2.0.9.1, 2.1.4.1, 2.2.3.1

## Impact

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:

```ruby
use Rack::Lint

```

Or

```ruby
use Rack::CommonLogger

```

All users running an affected release should either upgrade or use one of the workarounds immediately.

## Releases

The FIXED releases are available at the normal locations.

## Workarounds

Remove these middleware from your application

## Patches

To aid users who aren’t able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

- 2-0-shell-escape.patch - Patch for 2.0 series
- 2-1-shell-escape.patch - Patch for 2.1 series
- 2-2-shell-escape.patch - Patch for 2.2 series

## Credits

Thanks to [@vairelt](https://hackerone.com/vairelt) for reporting this

[2-2-shell-escape.patch](https://discuss.rubyonrails.org/uploads/short-url/9ymEwhlRFxiXhyVmLUpv5riMFQZ.patch) (3.0 KB) [2-1-shell-escape.patch](https://discuss.rubyonrails.org/uploads/short-url/riWxX4FBG8oB7B58H5iUJNG2zjJ.patch) (2.9 KB) [2-0-shell-escape.patch](https://discuss.rubyonrails.org/uploads/short-url/3sunCr8aiC0GtruojHj1fzrMabh.patch) (2.9 KB)
