CVE-2019-8322
Description
An issue was discovered in RubyGems 2.6 and later through 3.0.2. The gem owner command outputs the contents of the API response directly to stdout. Therefore, if the response is crafted, escape sequence injection may occur.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
RubyGems gem owner command outputs API response directly to stdout, allowing crafted responses to inject escape sequences.
Vulnerability
Description
CVE-2019-8322 is an escape sequence injection vulnerability in the RubyGems package manager, affecting versions 2.6 through 3.0.2 [1]. The gem owner command outputs the contents of the API response directly to standard output without sanitization [1]. If an attacker can control or modify the API response (such as a compromised RubyGems server or man-in-the-middle attack), they can embed terminal escape sequences that get interpreted by the user's terminal [2].
Attack
Vector and Prerequisites
Exploitation requires the attacker to influence the API response received by the gem owner command. This could happen if a user connects to a malicious gem server, or if an active network attacker modifies the response in transit [2]. The vulnerability does not require authentication, but the attacker must be able to serve or alter the API response. The injected escape sequences can cause the terminal to execute arbitrary commands or display misleading output, depending on the terminal emulator in use [2].
Impact
A successful escape sequence injection can lead to arbitrary code execution on the user's machine if the terminal interprets escape sequences in certain ways (e.g., via terminal-specific control sequences) [2]. Additionally, the attacker can manipulate the visible output to deceive the user, potentially tricking them into revealing credentials or performing unintended actions. The impact is heightened because users often run gem with elevated privileges [2].
Mitigation
RubyGems has released versions 3.0.3 and 2.7.8 that fix this vulnerability [2]. Users should upgrade to the latest stable version immediately. For those unable to upgrade from RubyGems 2.6, a patch is available [2]. The advisory confirms that these issues were responsibly disclosed via HackerOne [2].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
rubygems-updateRubyGems | >= 2.6.0, < 2.7.9 | 2.7.9 |
rubygems-updateRubyGems | >= 3.0.0, < 3.0.2 | 3.0.2 |
Affected products
29- RubyGems/RubyGemsdescription
- ghsa-coords28 versionspkg:gem/rubygems-updatepkg:rpm/opensuse/ruby2.5&distro=openSUSE%20Leap%2015.0pkg:rpm/opensuse/ruby2.5&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/ruby-bundled-gems-rpmhelper&distro=openSUSE%20Leap%2015.0pkg:rpm/opensuse/ruby-bundled-gems-rpmhelper&distro=openSUSE%20Leap%2015.1pkg:rpm/suse/ruby2.1&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/ruby2.1&distro=SUSE%20Enterprise%20Storage%205pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-LTSSpkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP2pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP4pkg:rpm/suse/ruby2.1&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5pkg:rpm/suse/ruby2.1&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/ruby2.1&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/ruby2.1&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/ruby2.5&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015pkg:rpm/suse/ruby2.5&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP1pkg:rpm/suse/yast2-ruby-bindings&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/yast2-ruby-bindings&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-LTSSpkg:rpm/suse/yast2-ruby-bindings&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP2pkg:rpm/suse/yast2-ruby-bindings&distro=SUSE%20OpenStack%20Cloud%207
>= 2.6.0, < 2.7.9+ 27 more
- (no CPE)range: >= 2.6.0, < 2.7.9
- (no CPE)range: < 2.5.5-lp151.4.3.1
- (no CPE)range: < 2.5.5-lp151.4.3.1
- (no CPE)range: < 0.0.2-lp151.2.1
- (no CPE)range: < 0.0.2-lp151.2.1
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.1.9-19.3.2
- (no CPE)range: < 2.5.5-4.3.1
- (no CPE)range: < 2.5.5-4.3.1
- (no CPE)range: < 3.1.53-9.8.1
- (no CPE)range: < 3.1.53-9.8.1
- (no CPE)range: < 3.1.53-9.8.1
- (no CPE)range: < 3.1.53-9.8.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.htmlghsavendor-advisoryx_refsource_SUSEWEB
- github.com/advisories/GHSA-mh37-8c3g-3fgcghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-8322ghsaADVISORY
- blog.rubygems.org/2019/03/05/security-advisories-2019-03.htmlghsaWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2019-8322.ymlghsaWEB
- hackerone.com/reports/315087ghsax_refsource_MISCWEB
- lists.debian.org/debian-lts-announce/2020/08/msg00027.htmlghsamailing-listx_refsource_MLISTWEB
News mentions
0No linked articles in our index yet.