CVE-2019-8324 json
Code injection in RubyGems
published 2019-06-17 7 y ago modified 2026-06-17 4 mo ago also GHSA-76wm-422q-92mq , EUVD-2019-0514
- cvss
- 8.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.2%
- EPSS 3.2% chance of exploitation in 30 days, percentile 88%
- public exploits
- 0
- none known
Summary
An issue was discovered in RubyGems 2.6 and later through 3.0.2. A crafted gem with a multi-line name is not handled correctly. Therefore, an attacker could inject arbitrary code to the stub line of gemspec, which is eval-ed by code in ensure_loadable_spec during the preinstall check.
Patch / fix
- rubygems rubygems-update 2.7.9, 3.0.2
- jruby Debian 14, Debian 13, Debian 12 9.1.17.0-3
- rubygems Debian 14, Debian 13, Debian 12 3.2.0~rc.1-1
debian advisories DEBIAN-CVE-2019-8324
- ruby2.0 Ubuntu 14.04 LTS 2.0.0.484-1ubuntu2.13
- ruby2.3 Ubuntu 16.04 LTS 2.3.1-2~16.04.12
- ruby2.5 Ubuntu 18.04 LTS 2.5.1-1ubuntu1.2
- ruby1.9.1 Ubuntu 14.04 LTS 1.9.3.484-2ubuntu1.14
- jruby Ubuntu Pro 14.04 LTS 1.5.6-9+deb8u2build0.14.04.1~esm2
ubuntu advisories UBUNTU-CVE-2019-8324
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rh-ruby23-ruby RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-70.el6
- rh-ruby23-ruby RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-70.el7
- rh-ruby23-ruby-irb RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-70.el6
- rh-ruby23-ruby-irb RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-70.el7
- rh-ruby23-rubygems RHEL 3 SOFTWARE_COLLECTIONS 2.5.2.3-70.el6
- rh-ruby23-rubygems RHEL 3 SOFTWARE_COLLECTIONS 2.5.2.3-70.el7
- rh-ruby23-ruby-libs RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-70.el6
- rh-ruby23-ruby-libs RHEL 3 SOFTWARE_COLLECTIONS 2.3.8-70.el7
red hat advisories RHSA-2020:2769RHSA-2019:1151RHSA-2019:1150RHSA-2019:1148RHSA-2019:1972RHSA-2019:1429
- ruby2.1 SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES for SAP 12 SP3 +14 more 2.1.9-19.3.2
- yast2-ruby-bindings SLES for SAP 12 SP2, SLES 12 SP2-LTSS, SLES 12 SP2-BCL +1 more 3.1.53-9.8.1
- ruby2.5 SLE Module for Basesystem 15 SP1, SLE Module for Basesystem 15 2.5.5-4.3.1
suse advisories SUSE-SU-2020:1570-1SUSE-SU-2019:1804-1
- ruby2.5 openSUSE Leap 15.1, openSUSE Leap 15.0 2.5.5-lp151.4.3.1
- ruby-bundled-gems-rpmhelper openSUSE Leap 15.1, openSUSE Leap 15.0 0.0.2-lp151.2.1
opensuse advisories openSUSE-SU-2019:1771-1
- rubygem-pg AlmaLinux 8 1.0.0-2.module_el8.5.0+2625+ec418553
- rubygem-pg AlmaLinux 8 1.0.0-2.module_el8.5.0+259+8cec6917
- rubygem-abrt AlmaLinux 8 0.3.0-4.module_el8.5.0+259+8cec6917
- rubygem-abrt AlmaLinux 8 0.3.0-4.module_el8.5.0+2623+08a8ba32
- rubygem-bson AlmaLinux 8 4.3.0-2.module_el8.5.0+2625+ec418553
- rubygem-bson AlmaLinux 8 4.3.0-2.module_el8.5.0+259+8cec6917
- rubygem-mongo AlmaLinux 8 2.5.1-2.module_el8.5.0+259+8cec6917
- rubygem-mongo AlmaLinux 8 2.5.1-2.module_el8.5.0+2625+ec418553
almalinux advisories ALSA-2019:1972
- rubygem-pg Rocky Linux 8 1.0.0-2.module+el8.4.0+592+03ff458a
- rubygem-pg Rocky Linux 8 1.0.0-2.module+el8.3.0+167+5c390590
- rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.5.0+738+032c9c02
- rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.3.0+167+5c390590
- rubygem-abrt Rocky Linux 8 0.3.0-4.module+el8.4.0+592+03ff458a
- rubygem-bson Rocky Linux 8 4.3.0-2.module+el8.4.0+592+03ff458a
- rubygem-bson Rocky Linux 8 4.3.0-2.module+el8.3.0+167+5c390590
- rubygem-mongo Rocky Linux 8 2.5.1-2.module+el8.4.0+592+03ff458a
rocky linux advisories RLSA-2019:1972
- ruby Alpine 3.7, Alpine 3.6 2.4.6-r0
- ruby Alpine 3.9, Alpine 3.8 2.5.5-r0
alpine advisories ALPINE-CVE-2019-8324
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2019-8324 updated cvss 7.2
rubygems: Installing a malicious gem may lead to arbitrary code execution
-
Red Hat CloudForms Management Engine 5.10 ruby 2.4.6-91.el7cf, cfme 5.10.5.1-1.el7cf, ruby-irb 2.4.6-91.el7cf, ruby-libs 2.4.6-91.el7cf, rubygems 2.6.14.4-91.el7cf, rubygem-rdoc 5.0.0-91.el7cf, +16 morefixed: vendor fix RHSA-2019:1429
-
Red Hat Enterprise Linux AppStream (v. 8) ruby 2.5.3-104.module+el8.0.0+3250+4b7d6d43, ruby-irb 2.5.3-104.module+el8.0.0+3250+4b7d6d43, rubygem-pg 1.0.0-2.module+el8.0.0+3250+4b7d6d43, rubygems 2.7.6-104.module+el8.0.0+3250+4b7d6d43, ruby-libs 2.5.3-104.module+el8.0.0+3250+4b7d6d43, rubygem-abrt 0.3.0-4.module+el8.0.0+3250+4b7d6d43, +17 morefixed: vendor fix RHSA-2019:1972
-
Red Hat Enterprise Linux Client (v. 7) ruby 2.0.0.648-35.el7_6, rubygems 2.0.14.1-35.el7_6, ruby-irb 2.0.0.648-35.el7_6, rubygem-json 1.7.7-35.el7_6, rubygem-rdoc 4.0.0-35.el7_6, ruby-libs 2.0.0.648-35.el7_6, +3 more Red Hat Enterprise Linux Client Optional (v. 7) rubygem-rake 0.9.6-35.el7_6, ruby-tcltk 2.0.0.648-35.el7_6, rubygem-minitest 4.3.2-35.el7_6 Red Hat Enterprise Linux ComputeNode (v. 7) ruby 2.0.0.648-35.el7_6, rubygems 2.0.14.1-35.el7_6, ruby-irb 2.0.0.648-35.el7_6, rubygem-json 1.7.7-35.el7_6, rubygem-rdoc 4.0.0-35.el7_6, ruby-libs 2.0.0.648-35.el7_6, +3 more Red Hat Enterprise Linux ComputeNode Optional (v. 7) rubygem-rake 0.9.6-35.el7_6, ruby-tcltk 2.0.0.648-35.el7_6, rubygem-minitest 4.3.2-35.el7_6 Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server (v. 7) ruby 2.0.0.648-35.el7_6, rubygems 2.0.14.1-35.el7_6, ruby-irb 2.0.0.648-35.el7_6, rubygem-json 1.7.7-35.el7_6, rubygem-rdoc 4.0.0-35.el7_6, ruby-libs 2.0.0.648-35.el7_6, +3 more Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server Optional (v. 7) rubygem-rake 0.9.6-35.el7_6, ruby-tcltk 2.0.0.648-35.el7_6, rubygem-minitest 4.3.2-35.el7_6fixed: vendor fix RHSA-2019:1235
+1 more productsfewer
Red Hat Enterprise Linux Server (v. 7) ruby 2.0.0.648-35.el7_6, rubygems 2.0.14.1-35.el7_6, ruby-irb 2.0.0.648-35.el7_6, rubygem-json 1.7.7-35.el7_6, rubygem-rdoc 4.0.0-35.el7_6, ruby-libs 2.0.0.648-35.el7_6, +3 more -
Red Hat Enterprise Linux Server AUS (v. 7.4) ruby 2.0.0.648-37.el7_4, rubygems 2.0.14.1-37.el7_4, ruby-irb 2.0.0.648-37.el7_4, rubygem-json 1.7.7-37.el7_4, rubygem-rdoc 4.0.0-37.el7_4, ruby-libs 2.0.0.648-37.el7_4, +3 more Red Hat Enterprise Linux Server E4S (v. 7.4) ruby 2.0.0.648-37.el7_4, rubygems 2.0.14.1-37.el7_4, ruby-irb 2.0.0.648-37.el7_4, rubygem-json 1.7.7-37.el7_4, rubygem-rdoc 4.0.0-37.el7_4, ruby-libs 2.0.0.648-37.el7_4, +3 morefixed: vendor fix RHSA-2020:2769
-
Red Hat Enterprise Linux Server Optional (v. 7) rubygem-rake 0.9.6-35.el7_6, ruby-tcltk 2.0.0.648-35.el7_6, rubygem-minitest 4.3.2-35.el7_6fixed: vendor fix RHSA-2019:1235
-
Red Hat Enterprise Linux Server Optional AUS (v. 7.4) rubygem-rake 0.9.6-37.el7_4, ruby-tcltk 2.0.0.648-37.el7_4, rubygem-minitest 4.3.2-37.el7_4 Red Hat Enterprise Linux Server Optional E4S (v. 7.4) rubygem-rake 0.9.6-37.el7_4, ruby-tcltk 2.0.0.648-37.el7_4, rubygem-minitest 4.3.2-37.el7_4 Red Hat Enterprise Linux Server Optional TUS (v. 7.4) rubygem-rake 0.9.6-37.el7_4, ruby-tcltk 2.0.0.648-37.el7_4, rubygem-minitest 4.3.2-37.el7_4 Red Hat Enterprise Linux Server TUS (v. 7.4) ruby 2.0.0.648-37.el7_4, rubygems 2.0.14.1-37.el7_4, ruby-irb 2.0.0.648-37.el7_4, rubygem-json 1.7.7-37.el7_4, rubygem-rdoc 4.0.0-37.el7_4, ruby-libs 2.0.0.648-37.el7_4, +3 morefixed: vendor fix RHSA-2020:2769
-
Red Hat Enterprise Linux Workstation (v. 7) ruby 2.0.0.648-35.el7_6, rubygems 2.0.14.1-35.el7_6, ruby-irb 2.0.0.648-35.el7_6, rubygem-json 1.7.7-35.el7_6, rubygem-rdoc 4.0.0-35.el7_6, ruby-libs 2.0.0.648-35.el7_6, +3 more Red Hat Enterprise Linux Workstation Optional (v. 7) rubygem-rake 0.9.6-35.el7_6, ruby-tcltk 2.0.0.648-35.el7_6, rubygem-minitest 4.3.2-35.el7_6fixed: vendor fix RHSA-2019:1235
-
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-ruby23-ruby 2.3.8-70.el6, rh-ruby24-ruby 2.4.6-92.el6, rh-ruby23-ruby-irb 2.3.8-70.el6, rh-ruby24-ruby-irb 2.4.6-92.el6, rh-ruby23-ruby-libs 2.3.8-70.el6, rh-ruby24-ruby-libs 2.4.6-92.el6, +27 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby25-ruby 2.5.5-7.el7, rh-ruby23-ruby 2.3.8-70.el7, rh-ruby24-ruby 2.4.6-92.el7, rh-ruby25-ruby-irb 2.5.5-7.el7, rh-ruby23-ruby-irb 2.3.8-70.el7, rh-ruby24-ruby-irb 2.4.6-92.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-ruby25-ruby 2.5.5-7.el7, rh-ruby23-ruby 2.3.8-70.el7, rh-ruby24-ruby 2.4.6-92.el7, rh-ruby25-ruby-irb 2.5.5-7.el7, rh-ruby23-ruby-irb 2.3.8-70.el7, rh-ruby24-ruby-irb 2.4.6-92.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-ruby25-ruby 2.5.5-7.el7, rh-ruby23-ruby 2.3.8-70.el7, rh-ruby24-ruby 2.4.6-92.el7, rh-ruby25-ruby-irb 2.5.5-7.el7, rh-ruby23-ruby-irb 2.3.8-70.el7, rh-ruby24-ruby-irb 2.4.6-92.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-ruby25-ruby 2.5.5-7.el7, rh-ruby23-ruby 2.3.8-70.el7, rh-ruby24-ruby 2.4.6-92.el7, rh-ruby25-ruby-irb 2.5.5-7.el7, rh-ruby23-ruby-irb 2.3.8-70.el7, rh-ruby24-ruby-irb 2.4.6-92.el7, +44 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-ruby23-ruby 2.3.8-70.el6, rh-ruby24-ruby 2.4.6-92.el6, rh-ruby23-ruby-irb 2.3.8-70.el6, rh-ruby24-ruby-irb 2.4.6-92.el6, rh-ruby23-ruby-libs 2.3.8-70.el6, rh-ruby24-ruby-libs 2.4.6-92.el6, +27 morefixed: vendor fix RHSA-2019:1151
+1 more productsfewer
Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby25-ruby 2.5.5-7.el7, rh-ruby23-ruby 2.3.8-70.el7, rh-ruby24-ruby 2.4.6-92.el7, rh-ruby25-ruby-irb 2.5.5-7.el7, rh-ruby23-ruby-irb 2.3.8-70.el7, rh-ruby24-ruby-irb 2.4.6-92.el7, +44 more
show 1 moreshow fewer
-
Red Hat Enterprise Linux 6 rubygems Red Hat Software Collections rh-ruby26-ruby, rh-ruby26-rubygems, rh-ruby26-ruby-libs, rh-ruby26-rubygem-irb, rh-ruby26-rubygem-json, rh-ruby26-rubygem-rake, +12 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
3.22% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | rubygems-update | >=2.6.0, <2.7.9 >=3.0.0, <3.0.2 |
2.7.9 3.0.2 |
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
lists.opensuse.org
/opensuse-security-announce/2019-07/msg00036.html
vendor-advisory, web, mailing-list, third-party-advisory
-
access.redhat.com
/errata/RHSA-2019:1972
vendor-advisory, web, third-party-advisory
-
hackerone.com
/reports/328571
permissions-required, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2020/08/msg00027.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2019-8324
advisory
-
blog.rubygems.org
/2019/03/05/security-advisories-2019-03.html
web
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2019-8324.yml
web
Sources
- CVE List CVE-2019-8324
- GitHub Advisory GHSA-76wm-422q-92mq
- NVD CVE-2019-8324
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.