Spectra Assure Free Trial
Get your 14-day free trial of Spectra Assure for Software Supply Chain Security
Get Free TrialMore about Spectra Assure Free TrialIn 2026, with AI now part of the picture and malicious actors increasingly abusing the CI/CD pipeline, we have seen a surge both in malicious packages published to public repositories and in compromises of legitimate, popular packages. The bulk of these attacks still target npm, where the number of malicious packages remains stubbornly high despite npm's ongoing security measures.
RubyGems hosts far fewer new packages every day, but it has been hit as well. While the overall volume differs, the shift is dramatic: malicious RubyGems uploads have climbed into the thousands this year, a stark increase compared to previous years.
ReversingLabs, alongside other threat research teams, has been actively monitoring RubyGems and shedding light on these campaigns. Below is a timeline of this year's events, starting with the newest one, which our own team analyzed. Together they make the case for staying vigilant even on repositories that do not have as much traffic.
RubyGems recently got its own version of Shai-Hulud. At the beginning of November, a gem called strutil-core appeared on the repository. Version 1.0.1 arrived with a fake native-extension build script (extconf.rb) that fetches the Bun JavaScript runtime and uses it to launch a multi-layer encrypted payload of roughly 5.5 MB. All of this happens the moment the gem is installed, with no need to ever load it in code.
We decoded every layer of the malicious version with our AI agent Armando. The payload collects cloud, CI, registry and AI tool credentials and ships them to a server behind the domain paleasbest.top. It carries routines for republishing itself to RubyGems, npm and PyPI using stolen credentials, tampers with the configuration of AI coding tools such as Claude, Cursor and Gemini as well as VS Code, and sets up a wiper. The wiper deletes the victim's home directory once it notices that a stolen GitHub token has been revoked. Our more in-depth analysis is available on our community page.
This matters beyond a single gem. The package strutil-core was not a hijacked legitimate package; it was a standalone gem dressed up as a harmless string helper. Socket reports that the code has ties to a worm family that grew out of the publicly released Shai-Hulud toolkit. Because that toolkit is public, shared code alone does not point to one operator. What it does show is that RubyGems now sits inside the reach of worms we used to associate with npm.
This year brought a campaign style usually seen on npm or PyPI. At the end of April, a set of packages went after developer secrets on RubyGems and in the Go ecosystem. We had seen infostealers on the repository before, but most were proof-of-concept (POC) packages or simple malware that grabbed basic system information. This time, the actor went for a much broader set of credentials and also tampered with CI settings.
Socket, which reported on the activity on May 1, attributes it to a single actor publishing gems under the name knot-theory, with a matching GitHub account, BufferZoneCorp. The actor released seven gems and nine Go modules. Five of the gems were weaponized: knot-activesupport-logger, knot-devise-jwt-helper, knot-rack-session-store, knot-rails-assets-pipeline and knot-rspec-formatter-json. Their names imitate everyday Rails, Devise, Rack and RSpec tooling. The remaining gems and a few of the Go modules were sleepers, clean for now and presumably meant to be weaponized later.
The malicious payload sat in ext/extconf.rb and ran during installation. It gathered environment variables whose names hint at secrets, such as tokens, keys, and AWS, GitHub, Stripe and npm values. It also read SSH keys and the credential files for AWS, npm, RubyGems, the GitHub CLI and .netrc, and sent everything as JSON to a webhook.site address.
In May, RubyGems was hit by a spam-like mass-publishing campaign. Mend.io flagged the first 120-plus malicious packages on May 11, and the cluster grew quickly from there. The volume was big enough that RubyGems suspended new account registrations on May 12 and reopened them on May 16.
The packages fell roughly into two buckets, both very simple. Some were empty placeholders. Others contacted UK government websites and fetched council meeting calendars, committee links and agenda item listings. Socket, which gave the campaign its name, uses GemStuffer for this scraping subset. A few packages also seemed to probe RubyGems itself with XSS attempts and other vulnerability research. RubyGems reported finding no evidence that attempts to obtain API keys succeeded.
On September 11, a group of independent researchers published a report linking the activity to OpenAI's AI agents. Their evidence is circumstantial, and they say so: hundreds of package names containing "oai", some packages listing "oai" as the author, and strong overlap with the DseWiki incident, including shared files and the same retrieval methods.
In the middle of July, a cryptojacking wave hit RubyGems. Palo Alto Networks' Unit 42 and Mend.io both reported on the incident. A large part of them were trojanized copies of popular libraries with a miner added. This is a common technique among malicious actors: copying legitimate code and hiding malicious code inside it works well, because at first glance the package looks clean and offers everything a developer might want from it.
The most advanced of these payloads is something we hadn't seen much of on RubyGems. It waits several hours before running, sets up persistence, spreads over SSH to hosts it finds on the victim's machine, and infects Node.js projects (package.json), Python projects (setup.py), Dockerfiles, git hooks and VS Code extensions, before downloading the XMRig miner. A second, simpler group of 23 gems, mostly typosquats, only fetched the latest XMRig release, with no persistence.
Around the same time, Aikido and StepSecurity reported on a different campaign dubbed SleeperGem. Malicious versions of packages git_credential_manager, fastlane-plugin-run_tests_firebase_testlab and Dendreo were all published around the same time in a coordinated attempt. While git_credential_manager was a malicious package from the start, the story with fastlane-plugin-run_tests_firebase_testlab and Dendreo is a little bit different. Dendreo was dormant since 2020, and then on July 18th, two new malicious versions were published, whereas fastlane-plugin-run_tests_firebase_testlab is a popular legitimate package on RubyGems. Since version 0.3.2 of the package was published, and that package has a different maintainer, this suggested compromise had a higher impact, and impacted more than one account.
Each malicious version is a loader, it fetches a second stage, in the end delivering a backdoor.
This technique was previously seen on npm, where packages stayed dormant for months before a malicious version was published.
In mid-August, OpenSourceMalware reported a set of typosquats of popular gems. The best-known target was bundler, one of the most downloaded gems on the repository, but the typosquats also imitated i18n, activesupport and rake. Typosquatting or alluding to the names of trusted, popular packages is a very common move among malicious actors, as it tricks developers into installing the wrong package in a hurry.
The code is short and simple. The extconf.rb file acts as a launcher for a small runner, and it writes a dummy Makefile so that the installation looks successful. The runner reports back to a server and, on Windows, downloads an executable from GitHub. That second stage is a large Rust loader with an embedded stealer. It takes saved browser logins, cookies and cards, extension data, crypto wallets and seed phrases, Telegram data and system information, and sends it all out through a file-sharing service.
While other repositories were frequently targeted during supply chain attacks, RubyGems usually was the one sitting it out. However, RubyGems is also lately being targeted. Shai Hulud worm hit GitHub Actions @7nohe/openapi-react-query-codegen, stealing among other things RubyGems credentials, which could be used to republish poisoned packages on RubyGems.
RubyGems was also used as a place where stolen secrets were stored, something we have already seen happen with GitHub. Mend.io describes RubyGems packages they discovered in June, containing stolen data, complete contents of a 1Password vault. This included plaintext passwords, SSH private keys, AWS credentials, crypto wallet seed phrases, Social Security numbers, credit card numbers and bank account details across 63 vault items.
Looking at the year as a whole, the campaigns differ in size and sophistication, but they lean on the same weaknesses:
Install-time code execution. The secret snatchers, strutil-core and the bundler typosquats all ran their malicious code through extconf.rb, the file RubyGems executes while installing a gem that declares a native extension. That means the code runs during installation, before the package is ever loaded or used. Not every campaign worked this way: the SleeperGem loader, for example, is reported to also trigger when the gem is loaded.
Trust in names and history. Typosquats of bundler, copies of popular gems and revived dormant packages like Dendreo all rely on developers trusting a name, a download count or a package's past. A new version of an old, trusted package is not automatically a safe one.
Stolen credentials crossing ecosystems. Tokens stolen in one ecosystem, like npm, can be used to publish in another. A worm that lands on one repository can reach RubyGems without any exploit against RubyGems itself.
Registries as infrastructure. Attackers used RubyGems not only to deliver malware, but also to scrape data and to store exfiltrated data.
None of this depends on who wrote the code. Whether a campaign is driven by human operators, traditional automation or, as is suspected in the case of the May wave, AI agents, the defense is the same: examine what a package actually does before it is allowed to run, and keep watching it after it is installed.
RubyGems is under attack, and it is no longer as dormant as it used to be. For years it was the repository that sat out most of the supply chain campaigns that kept hitting npm and PyPI. In 2026 it saw more capable infostealers, a mass-publishing wave of hundreds to thousands of packages that forced the repository to suspend new registrations, revived dormant packages, cryptominers, typosquats of some of its most popular gems, a dead drop for exfiltrated data, credentials harvested by an npm worm, and finally a Shai-Hulud descendant of its own.
Attackers go where the opportunity is, and smaller repositories offer fewer eyes and, often, fewer defenses. The volume is lower than on npm, but the techniques are the same, and every one of them has already been proven elsewhere. That is exactly why Ruby developers, maintainers and security teams should treat RubyGems like any other high-risk ecosystem: verify packages and versions before installation, scrutinize new versions of dormant packages and changes in maintainers, rotate credentials after any suspected exposure, and monitor what dependencies do at install time and afterwards.
We will keep tracking malicious activity on RubyGems and share what we find.


-1400x732.png&w=3840&q=75)
ReversingLabs researchers uncover a broader malware distribution operation, tracing related credential-stealing malware back nearly two months before the GTA VI lure and identifying previously undocumented threat infrastructure.


CISA's Java4Shell alert starts with a step most teams can't finish quickly: finding every Java runtime, including the ones vendors bundled for you.