CVE-2023-40165
Last modified
CVE-2023-40165 is a high-severity vulnerability rated 7.5/10 on the CVSS scale. 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. EPSS estimates a 0.40% chance of exploitation in the next 30 days.
Description
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. RubyGems contributor Maciej Mensfeld wrote a tool to automatically check that all downloaded .gem files match the checksums recorded in the RubyGems.org database. You can use it by running: `bundle add bundler-integrity` followed by `bundle exec bundler-integrity`. Neither this tool nor anything else can prove you were not exploited, but the can assist your investigation by quickly comparing RubyGems API-provided checksums with the checksums of files on your disk. The issue has been patched with improved input validation and the changes are live. No action is required on the part of the user. Users are advised to validate their local gems.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Rubygems | Rubygems.Org | < 2023-08-14 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2023-40165?
How severe is CVE-2023-40165?
How do I fix CVE-2023-40165?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2023
- CVE-2023-40159Rejected reason: This CVE ID has been rejected or withdrawn …
- CVE-2023-4016Under some circumstances, this weakness allows a user who ha…3.3
- CVE-2023-40160Directory traversal vulnerability exists in Mailing List Sea…3.7
- CVE-2023-40161Improper access control in some Intel Unite(R) Client softwa…7.8
- CVE-2023-40163An out-of-bounds write vulnerability exists in the allocate_…9.8
- CVE-2023-40164Notepad++ is a free and open-source source code editor. Vers…5.5
- CVE-2023-40166Notepad++ is a free and open-source source code editor. Vers…5.5
- CVE-2023-40167Jetty is a Java based web server and servlet engine. Prior t…5.3
- CVE-2023-40168TurboWarp is a desktop application that compiles scratch pro…6.5
- CVE-2023-4017The Goya theme for WordPress is vulnerable to Reflected Cros…6.1
- CVE-2023-40170jupyter-server is the backend for Jupyter web applications. …6.1
- CVE-2023-40171Dispatch is an open source security incident management tool…7.5
Are you affected by CVE-2023-40165?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
