High
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2019-16255
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 05:08 UTC · Revision 1
Source evidence
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.
osv:CVE-2019-16255
Complete source record
{
"id": "c9083d4d7d8fea2065d3a794ccc42914f7826b59dc5fc091a639bb2357e6bd1f",
"url": "https://osv.dev/vulnerability/CVE-2019-16255",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2019-16255",
"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.",
"evidence": "osv:CVE-2019-16255",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2019-16255",
"aliases": [
"CVE-2019-16255"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/graalvm/graalvm-ce-builds",
"type": "GIT",
"events": [
{
"introduced": "e57b8d283fb4de49639b22adcb9aad31baaa6352"
},
{
"last_affected": "e57b8d283fb4de49639b22adcb9aad31baaa6352"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:*",
"range": [
{
"introduced": "19.3.0.2"
},
{
"last_affected": "19.3.0.2"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"19.3.0.2",
"vm-19.3.0.2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-16255.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/ruby/ruby",
"type": "GIT",
"events": [
{
"introduced": "d4bb726b713658f56e630b6cf817a0155b6f390e"
},
{
"last_affected": "c91478058505cd8cae5160c1056bcde65af5a78b"
},
{
"introduced": "4e0a512972cdcbfcd5279f1a2a81ba342ed75b6e"
},
{
"last_affected": "189a36cfabfc30e785cece0692c802be87ebd9cf"
},
{
"introduced": "c1af7b1e1d408f9796a5f46c9ed36bc5adea4aa2"
},
{
"last_affected": "6315e42c222d5484004494950c7524a85acadb20"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "2.4.0"
},
{
"last_affected": "2.4.7"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "2.5.0"
},
{
"last_affected": "2.5.6"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "2.6.0"
},
{
"last_affected": "2.6.4"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-16255.json"
}
}
],
"modified": "2026-10-24T10:30:24.983796882Z",
"provider": "osv",
"references": [
"https://lists.debian.org/debian-lts-announce/2023/04/msg00033.html",
"https://lists.debian.org/debian-lts-announce/2019/11/msg00025.html",
"https://lists.debian.org/debian-lts-announce/2019/12/msg00009.html",
"https://lists.debian.org/debian-lts-announce/2020/08/msg00027.html",
"https://seclists.org/bugtraq/2019/Dec/31",
"https://seclists.org/bugtraq/2019/Dec/32",
"https://security.gentoo.org/glsa/202003-06",
"https://www.debian.org/security/2019/dsa-4587",
"https://www.ruby-lang.org/ja/news/2019/10/01/code-injection-shell-test-cve-2019-16255/",
"https://www.ruby-lang.org/ja/news/2019/10/01/ruby-2-4-8-released/",
"https://www.ruby-lang.org/ja/news/2019/10/01/ruby-2-5-7-released/",
"https://www.ruby-lang.org/ja/news/2019/10/01/ruby-2-6-5-released/",
"https://hackerone.com/reports/327512",
"https://www.oracle.com/security-alerts/cpujan2020.html"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*",
"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
},
{
"introduced": "9.0"
},
{
"last_affected": "9.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*"
],
"vendor_product": "opensuse:leap",
"extracted_events": [
{
"range": [
{
"introduced": "15.1"
},
{
"last_affected": "15.1"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2019-16255",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 431269,
"published_at": "2019-11-26T18:15:15.303+00:00"
}