Possible shell escape sequence injection vulnerability in RackGHSA-wq4h-7r42-5hrr
CRITICALFix: rack/rack@b426cc2GHSA-wq4h-7r42-5hrr is a critical-severity (CVSS 10) CWE-150 vulnerability in rack. A fix is available for rack — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
rack💎rack💎rackReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | rack | all versions | 2.0.9.1bundle update rack --conservative |
| 💎RubyGems | rack | ≥ 2.1&&< 2.1.4.1 | 2.1.4.1bundle update rack --conservative |
| 💎RubyGems | rack | ≥ 2.2&&< 2.2.3.1 | 2.2.3.1bundle update rack --conservative |
Affected Products
debian linuxdebianrackrack_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for rack, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update rack to 2.0.9.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wq4h-7r42-5hrr is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
- Because Red Hat OpenStack Platform 13.0 Operational Tools packaged the flawed code, but does not use its functionality, its Impact has been reduced to 'Low'. - To exploit this vulnerability, applications should have either of these middlewares 'Lint' or 'CommonLogger' installed, and vulnerable apps may have…
| Product | Fixed in | Advisory |
|---|---|---|
| Logging subsystem for Red Hat OpenShift 5.4 | openshift-logging/fluentd-rhel8:v1.14.5-51 | RHSA-2023:0632 |
| Red Hat Enterprise Linux 7 | pcs-0:0.9.169-3.el7_9.3 | RHSA-2022:7343 |
| Red Hat Gluster Storage 3.5 for RHEL 7 | rubygem-rack-0:2.2.4-1.el7rhgs | RHSA-2023:1486 |
Frequently Asked Questions
Is GHSA-wq4h-7r42-5hrr in your dependencies?
Find it across RubyGems, including transitive dependencies.