RubyGems

The strong_password RubyGems Supply Chain Attack

Updated 18 Nov 2026 · Incident date 25 Jun 2019

strong_password 0.0.7 on RubyGems downloaded and ran code from a stranger after the attacker published it on 25 June 2019.

strong_password 0.0.7 has the identifier CVE-2019-13354. Version 0.0.6 is clean.

The original maintainer, Brian McManus, lost control of his RubyGems account. The GitHub repository showed no change.

What happened

An attacker took over the owner's RubyGems account and published version 0.0.7 on 25 June 2019.

  • The new code sat at the end of lib/strong_password/strength_checker.rb.
  • A background thread waited a random time and checked that the app ran in production.
  • The thread fetched code from a Pastebin post and ran it with eval.
  • The code sent the URL_HOST value to a remote domain.
  • Added Rack middleware ran Base64 commands that came in an HTTP cookie.

A researcher found the problem on 3 July 2019 by comparing RubyGems.org with GitHub. RubyGems.org then yanked the release. SecurityWeek reports 537 downloads of 0.0.7.

Affected versions

  • strong_password 0.0.7 (malicious, CVE-2019-13354).
  • strong_password 0.0.6 (clean).

Indicators of compromise

  • Pastebin URL https://pastebin.com/raw/xa456PFt.
  • Domain smiley.zzz.com.ua.
  • A production check of the form Rails.env[0]=="p" in strength_checker.rb.
  • An HTTP cookie with an ___id parameter that carries Base64 text.

How to check

Search the installed gem files for the Pastebin address. Replace the path with the installed gem directory.

grep -rn 'pastebin' /path/to/installed/strong_password

Check Gemfile.lock and its history for the affected version.

grep -n strong_password Gemfile.lock

What to do now

  1. Pin strong_password to 0.0.6 or update to a fixed release, and run bundle update strong_password.
  2. If a production app ran 0.0.7, treat the server as compromised. Rotate secrets, keys and database credentials.
  3. Search outbound logs for pastebin.com and smiley.zzz.com.ua.
  4. Turn on two-factor authentication for every RubyGems account you own.

Frequently asked questions

Which strong_password version is malicious?

Version 0.0.7. Version 0.0.6 is clean.

How was the gem hijacked?

The researcher says the account fell to credential reuse across breached services and no two-factor authentication.

How can I find this kind of attack?

Compare gem contents on RubyGems.org with the source repository when you audit dependencies.

Sources

  1. withatwist.dev/strong-password-rubygem-hijacked.html
  2. securityweek.com/malicious-code-planted-strongpassword-ruby-gem/

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · What is a supply chain attack? · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library