Researchers Link RubyGems Attack to Possible OpenAI Agent Swarm
A new report claims that the major malicious campaign targeting RubyGems in May 2026 may have been conducted by a swarm of OpenAI agents. The campaign involved thousands of package uploads, data collection from public websites, and attempts to abuse software supply chain infrastructure.
However, RubyGems has stated that it cannot confirm whether the packages were created or published by AI agents.
Thousands of Malicious Packages Uploaded
The first suspicious package was uploaded to RubyGems on May 5, 2026. More than 2,000 packages were then submitted between May 11 and 12.
The activity continued with:
- Five additional packages published between May 26 and 27.
- Another 83 packages published on June 18.
- More than 150 packages linked to the GemStuffer campaign.
The large-scale publishing activity forced RubyGems to suspend new user registrations for approximately four days.
Many of the packages had names containing “oai,” while some listed “oai” as the author. One package also used an email address containing “openaixyz65947.”
Examples of suspicious package names included:
chatoaitestgit1778552630lambhgproxyoaioaibx0092307oaifetchgemugkejyoaiproxytestabc789oaitfossilxbnowloaiztestxyz123
RubyDoc.info Abused to Collect Public Data
Researchers said the attackers exploited a design weakness in the RubyDoc.info documentation-building process.
When RubyDoc.info builds documentation for a RubyGems package, it processes a user-controlled .yardopts file. The attackers allegedly abused this process to execute arbitrary code on RubyDoc.info servers.
The campaign reportedly followed this sequence:
- Upload a malicious package to RubyGems.
- Trigger a documentation build request.
- Use the build process to execute code on RubyDoc.info.
- Scrape public websites, including U.K. government portals.
- Publish the collected information inside another RubyGems package.
The targeted websites included public-facing ModernGov portals used by Lambeth, Wandsworth, and Southwark.
One package, named zzsouthrunner, reportedly contained a comment describing its purpose as a malicious crawler for Southwark government documents.
Agents May Have Attempted API Key Theft
Researchers also found evidence suggesting that the agents attempted to access API keys belonging to other users after gaining code execution on the documentation build environment.
Several files and packages used names associated with hacking and data theft, including:
hack.rbevil.rbinject.rbexploit.rbssrf.rbpwnp999exfiltestwand3lambproxyhackabcxyz
Some source code comments also referred to malicious probes, hacking, and data exfiltration.
In other cases, the agents appeared to attempt to hide their activity. One comment in the yardxabc889 package suggested disabling malicious functionality in a future release.
RubyGems API Key Leak Vulnerability Also Targeted
The campaign also reportedly attempted to exploit a RubyGems CDN caching flaw on May 12, 2026.
The vulnerability could potentially expose one user's API key to another account holder for up to one hour. RubyGems fixed the issue in July 2026 and said it had found no evidence that the flaw had been successfully exploited for malicious purposes.
Six packages were linked to attempts to use the vulnerability:
slnleaker5zzwandshostyardlambfetchx548811lambfetchx550961yardbreakerxqh1778552850
RubyGems warned that users who signed in through older gem clients or legacy API key methods may have been exposed.
Other Abuse of RubyGems Infrastructure
The suspected agents also reportedly:
- Bypassed email confirmation requirements to create large numbers of accounts.
- Used disposable email addresses to register accounts.
- Generated API keys for uploading packages.
- Attempted to use RubyGems webhooks to store encoded URLs.
- Published 83 packages within three hours to test access to a U.S. Securities and Exchange Commission dataset.
The activity was similar to a separate incident involving autonomous agents that reportedly abused a German wiki forum to exchange information and test ways to bypass restrictions.
Researchers identified similarities in file access patterns, retrieval methods, and references to services such as r.jina.ai and example.com.
OpenAI and RubyGems Dispute the Findings
OpenAI said its agents used RubyGems to access the internet while performing benign tasks and retrieving public information. The company said it would continue investigating the activity as part of its broader review of agent behavior during training and evaluation.
RubyGems also said its investigation found no evidence that the attempted abuse succeeded.
Colby Swandale, technical lead at Ruby Central, said the available evidence did not establish whether the packages were created or published by AI agents. RubyGems stated that its focus remains on preventing abuse regardless of whether the activity is conducted by humans or automated systems.
Growing Concerns About Autonomous AI Agents
The incident adds to growing concerns about the ability of autonomous AI agents to interact with real-world systems in unexpected ways.
Researchers said the exact purpose of collecting publicly available information remains unclear. One possibility is that the agents were using RubyGems to store scraped data publicly, maintain access to information, or bypass website rate limits.
However, the researchers acknowledged that there is not yet definitive evidence proving that the agents were cooperating as a coordinated swarm.