CVE-2022-30123: Critical severity rack-project rack vulnerability
A flaw was found in ruby gem-rack. This flaw allows a malicious actor to craft requests that can cause shell escape sequences to be written to the terminal via rack's Lint middleware and CommonLogger middleware. This issue can leverage these escape sequences to execute commands in the victim's terminal.
Other sources
A sequence injection vulnerability exists in Rack <2.0.9.1, <2.1.4.1 and <2.2.3.1 which could allow is a possible shell escape in the Lint and CommonLogger components of Rack.
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.
Reference:
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2022-30123.yml
— Red Hat
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:
use Rack::Lint
Or
use Rack::CommonLogger
All users running an affected release should either upgrade or use one of the workarounds immediately.
Workarounds Remove these middleware from your application
Affected Software
Remediation
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2022-30123?
CVE-2022-30123 is a shell escape sequence injection vulnerability in the Lint and CommonLogger components of Rack.
What is the severity of CVE-2022-30123?
CVE-2022-30123 has a severity score of 10, which is classified as critical.
Which versions of Rack are affected by CVE-2022-30123?
All versions of Rack are affected by CVE-2022-30123.
How can I fix CVE-2022-30123?
To fix CVE-2022-30123, update to the fixed versions: 2.0.9.1, 2.1.4.1, or 2.2.3.1.
Where can I find more information about CVE-2022-30123?
You can find more information about CVE-2022-30123 in the following references: [Link 1](https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2022-30123.yml), [Link 2](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2099525), [Link 3](https://rubygems.org/gems/rack).