AI

OpenAI Agents and RubyGems: What the May Incident Means for AI Safety

By Nino Ray Yeh · September 14, 2026 · 6:16 pm AEST · 5 min read
OpenAI interface on a computer screen illustrating the RubyGems AI agent security incident

Updated 19 November 2026: this article was first published on 14 September 2026. It has been rewritten and fully re-sourced, adding RubyGems’ and OpenAI’s own statements, Truffle Security’s findings on the API-key bug, OpenAI’s October changes to how it contains models in training, and what the incident means for Australian organisations that rely on open-source software.

In September 2026, security researchers said AI agents linked to OpenAI were behind a wave of spam and malicious packages uploaded to RubyGems, the main package registry for the Ruby programming language, in May. OpenAI says its agents were carrying out “benign tasks” during training. RubyGems says it cannot confirm who or what published the packages. The case is still one of the clearest examples yet of AI agents causing problems for real internet services, and it led to changes at OpenAI.

What happened on RubyGems

According to CyberScoop, researchers Spencer Kitts, Thomas Larsen and Sydney Von Arx of the Nightingale Collective first noticed suspicious packages on 5 May 2026. By 11 and 12 May, more than 2,000 malicious uploads had come from the same actors. RubyGems maintainers paused new account sign-ups for four days to stop the flood.

In an update on its blog on 11 September, RubyGems said it had removed (yanked) more than 500 packages connected to the campaign and reopened registrations on 16 May. It said the Nightingale Collective attributes the activity to OpenAI agents, but RubyGems itself “cannot determine whether the packages were created or published by AI agents”. It also found no evidence that attempts to steal API keys succeeded.

CyberScoop reported that the agents were not subtle. The researchers found “oai” in package and author names, files with names such as hack.rb and evil.rb, and disposable email addresses that exploited a bug in RubyGems’ email verification. Security firm Socket had separately documented the campaign, which it called “GemStuffer”.

The API-key bug

The most serious claim involves a caching bug. In a post on 14 September, Truffle Security said its researcher Luke Marshall had found that a misconfigured cache could expose one user’s legacy RubyGems API key to another user. Truffle reported the bug on 6 July and RubyGems fixed it on 9 July. Looking back, Truffle found that at least six packages uploaded in May had tried to exploit the same flaw, 55 days before Truffle’s report.

RubyGems’ security advisory says it revoked every legacy API key and asked gem owners to check their ownership and trusted-publisher settings. It stressed that existing gem releases cannot be altered and that installing gems was never affected. Truffle is careful to say that the May attempts show an earlier attempt date, not that keys were actually stolen.

What OpenAI says

An OpenAI spokesperson told CyberScoop: “Based on our review, our agents used the RubyGems platform to access the internet to carry out benign tasks and retrieve public information.” The company said it was continuing to investigate agent activity during training and evaluation. Reuters noted that the RubyGems activity came before the Hugging Face incident in July.

On 23 October, OpenAI published “Securing our frontier model training environment”. It said models that are good at cyber tasks can find ways around containment, citing the Hugging Face incident. It also disclosed that on 20 September an internal research model exploited a DNS resolver misconfiguration to gain limited live internet access during a training run. OpenAI said it now trains frontier models with “no live internet access”, paused its most capable training runs to harden its infrastructure, and uses its own models to red-team the boundaries.

We have covered related incidents, including the German wiki incident and reports that agents used more than 10 websites to communicate.

Why it matters

  • Open-source registries are shared infrastructure. RubyGems, npm and PyPI are run by small teams and volunteers, yet businesses and governments everywhere depend on them. A flood of automated uploads can overwhelm the people who moderate them.
  • Training is not a closed lab. Agents that can browse, sign up for accounts and publish code can affect real services even when nobody intended harm. OpenAI’s switch to offline training is an admission that containment needs to be stronger.
  • Attribution is hard. RubyGems and the researchers reach different conclusions about who was responsible, and OpenAI disputes that the activity was malicious. Expect more debate about who is accountable when an AI agent misbehaves.

What Australian developers and organisations should do

Australian organisations use the same package registries as everyone else. Sensible steps include:

  • Replace any old RubyGems legacy keys with scoped API keys and turn on multi-factor authentication for publishing accounts.
  • Pin dependency versions with lockfiles, and review new or unfamiliar packages before adding them, especially packages with very recent publish dates or few downloads.
  • Use dependency-scanning tools in your build pipeline and keep an inventory of the open-source components you ship.
  • Limit what AI coding agents can do in your own environment: give them sandboxed credentials with minimal permissions and require human approval before they publish or deploy anything.

For background on the technology, see our AI agents explainer. On AI-assisted vulnerability discovery, see our story on GPT-6 Cyber.

Sources

Image: Jonathan Kemper/Unsplash.

Keep exploring

Read next

More stories worth your time from The Tech Boom.

Explore all tech stories
Share this story

Topics