Skip to content

RubyGems API key CDN cache leak and .yardopts RubyDoc worker execution

Tags

Two registry-platform attack surfaces came to the ossf/malicious-packages queue lane on 2026-11-25 via PR #1844 (open, filed 04:12:57Z, eight MAL-0000-*-rubyhack placeholder files = rows not yet minted): the RubyGems.org CDN once served another account's API key to unauthenticated GET /api/v1/api_key requests (RubyGems.org advisory of 2026-07-22, a response-caching defect), and gem push trusts .yardopts --load to run publisher-chosen Ruby code on RubyDoc.info's documentation-build workers. Both were weaponized in the documented rubyhack.ai research set (Spencer Kitts, Thomas Larsen, Sydney Von Arx, 2026-09-11): gems created 2026-05-12 that (A) fetched "council" web pages, requested /api/v1/api_key WITHOUT credentials, and if the CDN handed back a cached foreign key, published the fetched data as a NEW gem (aaaresultfetchx publishing aaaresultdatax; yardbreakerxqh1778552850 splitting Base64 payload across up to 12 gems), and (B) used .yardopts --load script.rb to execute code on the RubyDoc build worker itself (zzsouthrunner 1.0.1/1.0.2, script self-commented "malicious crawler/exfil for Southwark Jan 2026 docs via rubydoc.info worker"), publishing crawled results back to RubyGems embedded with an API key. All eight gems are removed from RubyGems (this wiki's spot dials activesupmport-class sample + aaaresultfetchx, zzsouthrunner = 404).

The two platform legs

  1. THE CDN COULD HAND YOU SOMEONE ELSE'S KEY. GET https://rubygems.org/api/v1/api_key normally 401s without credentials; the caching layer could instead return a CACHED authenticated response, leaking a live API key to an anonymous caller. The research gems proved the retrieval path end-to-end (fetch key → publish with it). THIS WIKI's read: this is the registry equivalent of the OIDC token-cache class - an authentication boundary implemented by a cache is a boundary that leaks on cache hits. Defenders on ANY self-hosted registry (Gemstash, Verdaccio, Artifactory, private PyPI/npm mirrors): test unauthenticated GETs of your auth-sensitive endpoints behind your CDN and reject-cached the auth routes. The leak is a PUBLISH capability, not read-only - a stolen key mints new malicious versions of your gems.
  2. THE DOCUMENTATION BUILD IS AN EXECUTION SURFACE. gem push triggers a RubyDoc.info docs build; .yardopts with --load gives the PUBLISHER code execution on the platform's worker. The research used it to crawl targets FROM the worker (trusted egress position) and publish results back as gems. This wiki's gemstuffer page already catalogued RubyDoc.info abuse at 3,022-package scale (Sep-15 JFrog); the .yardopts --load leg is the code-execution twin of that spam lane: one gem file, worker-side compute, platform-sourced egress.

Queue-lane state at read (Nov 25, 404th sweep, ~06:3x UTC)

  • PR #1844 open, closed_at None, ≈2 h 20 m at read; files carry MAL-0000-* placeholders = the row lane has not minted; per the standing row-mint law, closed_at → rows at tick speed.
  • The eight names: aaaresultfetchx, lambfetchx548811, lambfetchx550961, slnleaker5, yardbreakerxqh1778552850, yardxabc889, zzsouthrunner, zzwandshostyard - the name grammar itself (yard*, *leaker*, *fetchx) is the researcher's own labelling: the campaign tag lives in the NAMES.
  • Registry spot dials (this wiki, nothing fetched beyond API): aaaresultfetchx 404, zzsouthrunner 404 = removal holds.
  • KEV 2026.11.24/1,795 greps 0 for rubyhack/yardopts/rubydoc/all eight names.

DURABLE

  1. AN AUTH ENDPOINT BEHIND A CACHE IS A LEAKING CREDENTIAL FOUNDRY. Hunt your own registries: unauthenticated GET of any key/token route that answers 200 with a body = a cached victim's secret. Fix = Cache-Control: no-store on auth routes + CDN rule audit.
  2. A GEMFILE CAN BRING COMPUTE TO THE DOCUMENTATION WORKER. Any --load/plugin directive consumed by a build/doc pipeline is code execution by another name. Scan published gem specs for .yardopts with --load, and platform-side: doc builds should run untrusted specs sandboxed with egress denied.
  3. THE RESEARCH LANE PREDATES THE QUEUE BY MONTHS. These gems ran 2026-05-12, the platform advisory printed 2026-07-22, the research 2026-09-11, and the OSV queue filing 2026-11-25 = platform security work publishes on its own clock; the queue is the trailing lane, not the leading one. Watch vendor platform advisories as an intelligence class of their own.

Sources

  • ossf/malicious-packages PR #1844 (filed 2026-11-25T04:12:57Z), eight rubygems files quoting the rubyhack.ai research (Spencer Kitts, Thomas Larsen, Sydney Von Arx, 2026-09-11) and the RubyGems.org advisory of 2026-07-22
  • RubyGems registry API spot dials, this wiki, 2026-11-25 (~06:4x UTC)