← console
voxell vciy

CVE-2023-40165: Unauthorized gem replacement for full names ending in numbers on rubygems.org

ROUTINE

Telemetry drift only. No threshold crossed and no authority ruling changed.

CVE record, CISA KEV and EPSS as of 2026-12-06.

CVEs like this one computed, by meaning

What to do now held facts and links

  1. Upgrade to rubygems.org 2023-08-14 or later upper bounds of the CVE record's affected ranges
  2. Record your decision, dated and frozen with today's evidence: patch by a date · mitigated by a compensating control · deferred · accepted the risk · not affected
  3. Check your version against the ranges this record publishes.

What it is stated by the CNA

rubygems.org is the Ruby community's primary gem (library) hosting service. Insufficient input validation allowed malicious actors to replace any uploaded gem version that had a platform, version number, or gem name matching `/-\d/`, permanently replacing the legitimate upload in the canonical gem storage bucket, and triggering an immediate CDN purge so that the malicious gem would be served immediately. The maintainers have checked all gems matching the `/-\d/` pattern and can confirm that no unexpected `.gem`s were found. As a result, we believe this vulnerability was _not_ exploited. The easiest way to ensure that a user's applications were not exploited by this vulnerability is to check that all of your downloaded .gems have a checksum that matches the checksum recorded in the RubyGems.org database. …

weakness
CWE-20: Improper Input Validation
affected
rubygems rubygems.org
published ranges
rubygems.org < 2023-08-14
first unaffected version, by branch
rubygems.org 2023-08-14
severity
7.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N
assigned by
GitHub_M
published
2023-08-17

check us github.com github.com

Exploit code held, dated

exploit code
None held in the PoC-in-GitHub feed. A public repository changes this brief.

What moved held, dated

dateEPSSevent
18 Aug 20230.00043
25 Aug 20230.00047
17 Jul 20240.00051
23 Aug 20240.00064
17 Mar 20250.00212scoring model v2025.03.14
15 Jun 20260.00395scoring model v2026.06.15
18 Aug 20260.00459
28 Nov 20260.00615
1 Dec 20260.00459

20 observations held. A step marked with a scoring model moved because the measurement was replaced, not because the vulnerability changed.

Outside the record model-written, researched, cited

This section reads the record's references and adds cited findings from outside it. It needs an account. Everything above is held facts and is complete without it.

Get started with CVE-2023-40165 (20s setup) Triage in Vesper (no login) · Sign in to add the researched section

What would change this brief held, dated

CISA KEV
Not listed in the catalogue we hold. A listing changes this brief.
exploit probability
0.00 on 2026-12-01 (FIRST's EPSS, a probability and not evidence of exploitation). Next band line: 10% (0.10). Crossing a line changes this brief.
fix
Held: rubygems.org 2023-08-14. A newer fix from the CNA or OSV changes this brief.

Watch this CVE Guided 20s setup · What counts as a move

How to check this

Every value above is held with two dates: when it was true upstream (as_of) and when we recorded it (tx_from). Re-derive the exploit probability as it stood on any date:

SELECT value, source, source_version, as_of, tx_from
FROM volatile_valid_as_of('CVE-2023-40165', '2026-12-06T23:59:59.999999Z', now());