CVE-2022-29218 in Rubygems.Org
RubyGems is a package registry used to supply software for the Ruby language ecosystem. An ordering mistake in the code that accepts gem uploads allowed some gems (with platforms ending in numbers, like `arm64-darwin-21`) to be temporarily replaced in the CDN cache by a malicious package. The bug has been patched, a...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, full integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Rubygems | Rubygems.Org | No version listed by the source |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
RubyGems is a package registry used to supply software for the Ruby language ecosystem. An ordering mistake in the code that accepts gem uploads allowed some gems (with platforms ending in numbers, like `arm64-darwin-21`) to be temporarily replaced in the CDN cache by a malicious package. The bug has been patched, and is believed to have never been exploited, based on an extensive review of logs and existing gems by rubygems. The easiest way to ensure that an application has not been exploited by this vulnerability is to verify all downloaded .gems checksums match the checksum recorded in the RubyGems.org database. RubyGems.org has been patched and is no longer vulnerable to this issue.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2022-29218 |
|---|---|
| BreachSpider ID | BS-2022-GLOBAL-068619-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| Published | 2022-05-13 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-269: Improper Privilege Management
Software does not properly assign, modify, track, or check privileges, allowing unauthorized elevation of access.
CWE-290: CWE-290
CWE-863: Incorrect Authorization
Software performs an authorization check incorrectly, allowing access beyond intended privileges.
Related attack patterns (CAPEC)
CAPEC-58 Restful Privilege Elevation via CWE-269
CAPEC-59 Session Credential Falsification through Prediction via CWE-290
CAPEC-60 Reusing Session IDs (aka Session Replay) via CWE-290
CAPEC-459 Creating a Rogue Certification Authority Certificate via CWE-290
CAPEC-476 Signature Spoofing by Misrepresentation via CWE-290
Show all 13
CAPEC-667 Bluetooth Impersonation AttackS (BIAS) via CWE-290
CAPEC-461 Web Services API Signature Forgery Leveraging Hash Function Extension Weakness via CWE-290
CAPEC-473 Signature Spoof via CWE-290
CAPEC-21 Exploitation of Trusted Identifiers via CWE-290
CAPEC-22 Exploiting Trust in Client via CWE-290
CAPEC-94 Adversary in the Middle (AiTM) via CWE-290
CAPEC-122 Privilege Abuse via CWE-269
CAPEC-233 Privilege Escalation via CWE-269
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A vulnerability in RubyGems due to an ordering mistake in the code that accepts gem uploads could allow malicious packages to temporarily replace legitimate ones in the CDN cache.
An attacker could upload a malicious gem with a platform name ending in numbers (e.g., 'arm64-darwin-21') that would temporarily replace a legitimate gem in the CDN cache, potentially leading to the execution of malicious code on systems that download the affected gem.
Questions
What is CVE-2022-29218?
A vulnerability in RubyGems due to an ordering mistake in the code that accepts gem uploads could allow malicious packages to temporarily replace legitimate ones in the CDN cache.
What is the CVSS score for CVE-2022-29218?
CVE-2022-29218 has CVSS 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. EPSS: 1.0%.
Is CVE-2022-29218 actively exploited?
No confirmed active exploitation of CVE-2022-29218 as of 2026-09-25.
How do I remediate CVE-2022-29218?
Priority: MEDIUM.
What systems are affected by CVE-2022-29218?
CVE-2022-29218 affects Rubygems Rubygems.Org.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Rubygems","product":"Rubygems.Org","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.