Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4 allows code injection if…
Priority MEDIUM 42CWE-94Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 7 fixed, 5 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-94.
Summary
Ruby through 2.4.7, 2.5.x through 2.5.6, and 2.6.x through 2.6.4 allows code injection if the first argument (aka the "command" argument) to Shell#[] or Shell#test in lib/shell.rb is untrusted data. An attacker can exploit this to call an arbitrary Ruby method.
Why it matters now
EPSS 0.04187 90th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial Red Hat: 6 advisoriesRed Hat: 7 fixed, 5 without a fix
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
CPE configurations NVD · 5
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* | 2.4.0 – 2.4.7; 2.5.0 – 2.5.6; 2.6.0 – 2.6.4 | Vulnerable | ruby |
| cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
| cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:* | 15.1 | Vulnerable | openSUSE |
| cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:* | 19.3.0.2 | Vulnerable | Oracle |
- cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* Versions 2.4.0 – 2.4.7; 2.5.0 – 2.5.6; 2.6.0 – 2.6.4 Vulnerable ·ruby
- cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
- cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:* Versions 15.1 Vulnerable ·openSUSE
- cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:* Versions 19.3.0.2 Vulnerable ·Oracle
Remediation
Red Hat 6 advisories
- RHSA-2022:0582 Released 2022-02-21 · Red Hat rating Importantruby:2.6 security update
- Red Hat Enterprise Linux AppStream EUS (v. 8.2) ruby-2.6.9-107.module+el8.2.0+14086+86d863af.aarch64::ruby:2.6, ruby-2.6.9-107.module+el8.2.0+14086+86d863af.i686::ruby:2.6, ruby-2.6.9-107.module+el8.2.0+14086+86d863af.ppc64le::ruby:2.6 +47
- RHSA-2022:0581 Released 2022-02-21 · Red Hat rating Importantruby:2.6 security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.1) ruby-2.6.9-107.module+el8.1.0+14088+04cf326e.i686::ruby:2.6, ruby-2.6.9-107.module+el8.1.0+14088+04cf326e.ppc64le::ruby:2.6, ruby-2.6.9-107.module+el8.1.0+14088+04cf326e.src::ruby:2.6 +47
- RHSA-2021:2587 Released 2021-06-29 · Red Hat rating Moderateruby:2.5 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-2.5.9-107.module+el8.4.0+10822+fe4fffb1.aarch64::ruby:2.5, ruby-2.5.9-107.module+el8.4.0+10822+fe4fffb1.i686::ruby:2.5, ruby-2.5.9-107.module+el8.4.0+10822+fe4fffb1.ppc64le::ruby:2.5 +47
Show 3 more Red Hat advisories
- RHSA-2021:2588 Released 2021-06-29 · Red Hat rating Moderateruby:2.6 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 8) ruby-2.6.7-107.module+el8.4.0+10830+bbd85cce.aarch64::ruby:2.6, ruby-2.6.7-107.module+el8.4.0+10830+bbd85cce.i686::ruby:2.6, ruby-2.6.7-107.module+el8.4.0+10830+bbd85cce.ppc64le::ruby:2.6 +47
- RHSA-2021:2230 Released 2021-06-03 · Red Hat rating Moderaterh-ruby26-ruby security, bug fix, and enhancement update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby26-ruby-2.6.7-119.el7, rh-ruby26-ruby-devel-2.6.7-119.el7, rh-ruby26-ruby-doc-2.6.7-119.el7 +18
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-ruby26-ruby-2.6.7-119.el7, rh-ruby26-ruby-devel-2.6.7-119.el7, rh-ruby26-ruby-doc-2.6.7-119.el7 +18
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby26-ruby-2.6.7-119.el7, rh-ruby26-ruby-devel-2.6.7-119.el7, rh-ruby26-ruby-doc-2.6.7-119.el7 +18
- RHSA-2021:2104 Released 2021-05-26 · Red Hat rating Moderaterh-ruby25-ruby security, bug fix, and enhancement update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby25-ruby-2.5.9-9.el7, rh-ruby25-ruby-devel-2.5.9-9.el7, rh-ruby25-ruby-doc-2.5.9-9.el7 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-ruby25-ruby-2.5.9-9.el7, rh-ruby25-ruby-devel-2.5.9-9.el7, rh-ruby25-ruby-doc-2.5.9-9.el7 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-ruby25-ruby-2.5.9-9.el7, rh-ruby25-ruby-devel-2.5.9-9.el7, rh-ruby25-ruby-doc-2.5.9-9.el7 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby25-ruby-2.5.9-9.el7, rh-ruby25-ruby-devel-2.5.9-9.el7, rh-ruby25-ruby-doc-2.5.9-9.el7 +17
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 5 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Will not fix |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2021:2587, RHSA-2021:2588 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.1) | Fixed | RHSA-2022:0581 |
| Red Hat Enterprise Linux AppStream EUS (v. 8.2) | Fixed | RHSA-2022:0582 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2021:2104, RHSA-2021:2230 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) | Fixed | RHSA-2021:2104 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2021:2104, RHSA-2021:2230 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2021:2104, RHSA-2021:2230 |
Timeline
- 2026-10-02 Threatist record created from CVE-2019-16255
- 2026-10-03 Alias added: GHSA-ph7w-p94x-9vvw
References
Exploit 1
Advisory 9
- https://lists.debian.org/debian-lts-announce/2019/11/msg00025.html
- https://www.ruby-lang.org/ja/news/2019/10/01/code-injection-shell-test-cve-2019-16255/
- [debian-lts-announce] 20191210 [SECURITY] [DLA 2027-1] jruby security update
- 20191217 [SECURITY] [DSA 4587-1] ruby2.3 security update
- 20191217 [SECURITY] [DSA 4586-1] ruby2.5 security update
- DSA-4587
- GLSA-202003-06
- openSUSE-SU-2020:0395
- [debian-lts-announce] 20200816 [SECURITY] [DLA 2330-1] jruby security update
Sources
- CVE-2019-16255 · CVE Program
- CVE-2019-16255 · NVD
- FIRST EPSS
- GHSA-ph7w-p94x-9vvw · GitHub Advisory Database · CC BY 4.0
- CVE-2019-16255 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences