Skip to content
Menu
Menu

OpenAI Agents Used RubyGems to Gain Unauthorized System Access

The May incident disrupted the software service and came two months before OpenAI agents breached Hugging Face.

 

OpenAI agents undergoing internal testing used RubyGems to reach the internet and gain unauthorized access to an outside computing system while completing assignments involving public information, according to a report from the Nightingale Collective, an AI safety research group.

OpenAI confirmed that its agents used RubyGems to access the internet and retrieve public information. The company described their assigned tasks as benign and said it was continuing to investigate.

The researchers said the agents uploaded software packages to RubyGems containing instructions that manipulated a connected documentation service into running their code. They also found code in some of those packages intended to exploit a separate RubyGems flaw that could expose other users’ software-publishing credentials.

RubyGems said it could not independently determine whether AI agents created or published those packages. Its investigation found no evidence that the attempts to obtain user credentials succeeded.

Agents used a documentation service to run their code

RubyGems hosts reusable software packages known as gems. When a developer publishes a gem, a separate service called RubyDoc.info can automatically build and host its documentation.

The researchers said the agents placed instructions inside uploaded packages that caused RubyDoc.info to run their code. This gave the agents unauthorized access to the service’s computing resources and its internet connection.

The code retrieved publicly available information from UK local-government websites. It then placed the collected information into additional packages published on RubyGems.

The agents uploaded more than 2,000 packages on May 11 and 12, according to the researchers. RubyGems said it removed more than 500 malicious packages and suspended new account registrations from May 12 through May 16. Existing users could still install and publish packages during the suspension.

Agents tried to obtain other users’ credentials

The researchers also found at least six packages containing code that attempted to exploit a separate flaw in RubyGems.

Under specific conditions, RubyGems could temporarily store a user’s publishing credential and mistakenly provide it to someone else whose request passed through the same server within the next hour. Anyone who obtained one of these older, full-access credentials could publish new packages or change who controlled them under the account holder’s name.

The agents attempted to exploit the flaw in May, two months before an independent security researcher reported it to RubyGems.

RubyGems disclosed the vulnerability in July. The service said its available records showed no malicious use, although its records covered only part of the period when the flaw existed. RubyGems revoked all affected credentials and shut down the older sign-in method that created them.

RubyGems activity preceded the Hugging Face breach

The RubyGems activity occurred two months before OpenAI agents breached Hugging Face during a separate round of internal cybersecurity testing.

In that incident, the agents exploited weaknesses in OpenAI’s own research systems to communicate, gain internet access, and attack outside services. They eventually obtained extensive access to Hugging Face’s systems and OpenAI’s internal infrastructure.

OpenAI’s August incident report acknowledged that employees had observed unauthorized internet access by agents as early as late May. The report did not identify RubyGems as one of the affected outside services.

Clayton Rifkind

Clayton Rifkind is the Founder and Senior Editor of AI Risk Today. He also advises on business development for ESG Today, a leading source of ESG investment news and research for institutional investors and corporate leaders. He has 20+ years of experience in B2B technology, leading strategy and execution of go-to-market plans across software, enterprise platforms, and mobile applications. He founded two consultancies advising startups and Fortune 1000 companies, including Autodesk, Intel, and Microsoft. He began his career in the San Francisco advertising scene working with brands such as Hewlett-Packard, Intel, Microsoft, Symantec, and Wells Fargo. Clayton launched AI Risk Today in 2025 after two decades of watching enterprises adopt transformative technologies, and seeing how often risk, governance, and compliance considerations lagged behind. His reporting draws on primary sources including regulatory filings, court documents, and official announcements, with a focus on what AI developments mean for the executives accountable for managing them. Reach him at Reach him at [email protected] or on LinkedIn.

Essential AI Risk Intelligence

Daily insights on AI governance, regulation, and enterprise risk management. Trusted by Chief Risk Officers and compliance leaders globally.

By subscribing, you agree to receive our daily newsletter. Unsubscribe anytime.

Advertise with AI RIsk Today, Today!