MAL-2026-18599: Malicious code in w002yardprobe (RubyGems)

Published Nov 4, 2026
·
Updated

--- -= Per source details. Do not edit below this line.=-

Source: amazon-inspector (721580f8eda44ad5ee7604f5ba0648e8830302f784e3e4a995e02ca7359c909e) The gem ships a .yardopts file containing --load./script.rb, which causes YARD to execute script.rb whenever documentation is generated for the gem (locally via yard doc, in CI, or on doc-hosting services such as RubyDoc.info). script.rb collects host identifiers — Socket.gethostname, current working directory, UID, and RUBYVERSION — and POSTs them via Net::HTTP.postform to the hardcoded third-party collector https://webhook.site/97fa3c6a-3fad-4d2d-8312-15dc37e41e66. The same script also rewrites lib/w002yardprobe.rb in place (substituting a MARKSLOT token with a runtime stamp) and drops sentinel files W002SCRIPTRAN.txt and W002EGRESSOK.txt in the detected build directory (e.g. /build), indicating the gem is instrumented to probe a documentation-build sandbox. The package self-identifies as a probe; the exfiltration and build-environment mutation are the gem's purpose. The trigger is YARD doc generation rather than gem install or require, so the harm materializes against whichever host (developer workstation, CI runner, or doc-hosting pipeline) processes the gem's documentation.

Affected Software

1 affected component
rubygems/w002yardprobe=0.0.4, =0.0.5

Event History

Nov 4, 2026
Advisory Published
via OSV·02:58 AM
Data Sourced
via OSV·02:58 AM
DescriptionAffected Software

Frequently Asked Questions

1

Who is exposed to this package's behavior?

Systems that generate YARD documentation for the gem are exposed, including developer workstations running `yard doc`, CI documentation jobs, and documentation-hosting services. Installing the gem or requiring it alone does not trigger the described behavior.

2

What does the documentation build script do when triggered?

It collects the hostname, current working directory, UID, and Ruby version, then submits them to a hardcoded third-party webhook. It also modifies `lib/w002yardprobe.rb` and creates `W002SCRIPT_RAN.txt` and `W002EGRESS_OK.txt` sentinel files in the detected build directory.

3

How can I determine whether the script ran in a build environment?

Look for `W002SCRIPT_RAN.txt` and `W002EGRESS_OK.txt` in the build directory, such as `/build`. Also inspect `lib/w002yardprobe.rb` for replacement of the `MARKSLOT` token with a runtime stamp.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203