Spotting a Typosquat in Your Gemfile.lock
In August 2026, one account on RubyGems.org published fifteen gems named after gems that sit in almost every Rails lockfile: i18om and ioe18n for i18n,
orakw for rake, brumdler for bundler, activesupmport for activesupport. That’s typosquatting: publishing a package under a name one slip away from a
popular one, so that a mistyped gem line, or a lockfile change nobody reads closely, installs the attacker’s code instead.
OpenSourceMalware found them on August 15, the day they were published, and they
had hundreds of downloads before they were taken down. Each of these malicious RubyGems typosquats ran its payload from an extconf.rb file during
bundle install, before any application code or test had a chance to run.
Dependency scanners, the tools that check your lockfile against databases of reported vulnerabilities and malware, took a lot longer. OSV published malware records for ten of the gems on November 25, 102 days later, and GitHub published advisories the day after that.
bundler-audit had no entry for any of them as of November 30. So a team that installed one in August and relied on its dependency scanner heard nothing until the end of November. We covered the wider history of RubyGems supply-chain attacks in The Hidden Dangers in Your Gemfile . This post looks at one campaign up close, using a harmless demo app we built to reproduce its install path.
In this article, you’ll see what one of these gems looks like in a lockfile diff, why its code runs before anyone reviews it, and which checks would have flagged it.
The StubMaker gems
OpenSourceMalware called the campaign StubMaker. OSV has malware records for ten of the fifteen gems, published from the OpenSSF malicious-packages repository with OpenSourceMalware credited as the finder. Every version of each gem is marked as affected:
| Gem | Looks like | OSV record | Downloads |
|---|---|---|---|
activesupmport |
activesupport |
MAL-2026-20630 | 61 |
brumdler |
bundler |
MAL-2026-20631 | 192 |
i18om |
i18n |
MAL-2026-20632 | 63 |
i1l8n |
i18n |
MAL-2026-20633 | 61 |
iai8n |
i18n |
MAL-2026-20634 | 65 |
ie18u |
i18n |
MAL-2026-20635 | 70 |
ioe18n |
i18n |
MAL-2026-20636 | 75 |
ise18n |
i18n |
MAL-2026-20637 | 60 |
joxn |
unclear | MAL-2026-20638 | 339 |
orakw |
rake |
MAL-2026-20639 | 58 |
The download counts are OpenSourceMalware’s, as listed in
Corgea’s write-up . Neither source says which
gem joxn imitates, so we won’t guess. The other five gems from the same account, ubnlder, ubnuler, ri18nr, rakier and reaker, have no
OSV records at the time of writing, although GitHub has published advisories for them.
None of these gems contains a real native extension. Each ships an extconf.rb, the file RubyGems runs when it installs a gem with a C extension.
According to Corgea, that file loads a launcher that writes an empty Makefile and stub scripts so the build step reports success without compiling
anything.
On every operating system, the launcher sends the platform name to 193.70.34[.]101:20099 over plain HTTP. On Windows, it also downloads and runs
a main.exe from a GitHub release, which OpenSourceMalware describes as a Rust loader for a Go infostealer that collects browser credentials,
crypto wallets and Telegram data and reports to dresslee[.]com. The second stage is Windows-only, but macOS and Linux machines still ran the
attacker’s code at install time.
If you want to check your own logs, the published indicators are the domain dresslee[.]com, the IP 193.70.34[.]101 and the main.exe SHA-256
6f088ade49456db2422c3edfbb9998f4a3e9cce7c4c00a7279fb45d672a82b7d. Corgea’s write-up has commands for scoping a machine, and recommends treating any
host that installed one of the gems as compromised.
As of November 27, the RubyGems.org API returns a 404 for all ten names, which doesn’t tell us when or how they were removed. We didn’t download or install any of the real gems for this post, everything about the payload comes from those two write-ups and OSV.
What one looks like in a lockfile
To see what a reviewer would get, we built typosquat-install-demo : a default Rails 8.1 app
plus a harmless gem called l18n, with a lowercase L where i18n has an i. The name isn’t registered on RubyGems.org, and the gem only writes a
marker file when it’s installed (more on that in the next section).
The gem arrives in a pull request titled “Add i18n formatting helper”. It adds a
four-line formatted_t helper to ApplicationHelper, and this to the Gemfile:
# Formatting helpers for translated strings
source "http://localhost:9292" do
gem "l18n"
end
On the Gemfile.lock side, the same PR adds seven lines and changes nothing else:

The source block and the localhost:9292 remote are only there because the demo serves its gem from a local gem server (a path: gem wouldn’t do,
because Bundler doesn’t compile C extensions for those). A real typosquat would most likely show up as a plain
gem "l18n" line in the Gemfile and land in the same remote: https://rubygems.org/ block as the other 122 gems in this app. That leaves the name as
the only clue in a lockfile of more than 500 lines.
The new CHECKSUMS entry doesn’t help here either. Checksums protect you from a gem changing after you’ve locked it, but they record whatever you
installed the first time, typosquat included.
Why code review misses it
Everything a reviewer can read in that PR looks reasonable. The helper calls L18n.format, the Gemfile comment matches what the helper does, and
the gem’s own code isn’t in the diff at all, it lives on the gem server. When a gem declares a native extension, RubyGems runs its extconf.rb
during installation to generate a Makefile, and that file is plain Ruby that can do anything the installing user can do.
This is the demo gem’s ext/l18n/extconf.rb, trimmed to the parts that run:
marker = File.join(Dir.tmpdir, "typosquat-demo-marker.txt")
env_names = ENV.keys.select do |name|
name == "GITHUB_TOKEN" || name == "RAILS_MASTER_KEY" || name.start_with?("AWS_")
end
File.write(marker, <<~MARKER)
typosquat-install-demo: extconf.rb ran during gem install
time: #{Time.now.iso8601}
user: #{Etc.getlogin || ENV["USER"]}
pwd: #{Dir.pwd}
env var names seen: #{env_names.sort.join(", ")}
MARKER
warn "typosquat-install-demo: extconf.rb ran, marker written to #{marker}"
File.write("Makefile", <<~MAKEFILE)
all:
\t@:
install:
\t@:
clean:
\t@:
MAKEFILE
It writes a marker file with the names (never the values) of a few secret-looking environment variables, then writes a Makefile that does nothing,
so the “build” succeeds. It’s the same trick StubMaker used, minus the network calls.
This is what checking out the PR branch and running bundle install looks like:
$ cd app && bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from http://localhost:9292/.
Fetching l18n 0.1.0
Installing l18n 0.1.0 with native extensions
Bundle complete! 24 Gemfile dependencies, 123 gems now installed.
“Installing l18n 0.1.0 with native extensions” is the only sign that anything ran. The warn line from extconf.rb doesn’t show up, not even with
bundle install --verbose, because RubyGems throws away the extension build output when the build succeeds. Since RubyGems 4.1, which the demo runs,
it also stopped keeping that output in a gem_make.out log, so the marker file is the only way to tell the code ran. On older versions, the warn
line ends up in gem_make.out under the gem’s directory in your gems’ extensions folder.
In CI, install-time code usually gets more to look at, because CI tends to have deploy keys and cloud credentials in its environment. The demo’s
workflow sets fake AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and RAILS_MASTER_KEY values and runs the install the way a lot of pipelines do,
with BUNDLE_FROZEN=true. This is the marker from the CI run on the PR :

A frozen install refuses to change the lockfile, but it installs whatever the lockfile already says, and this lockfile says l18n. The same job then
removed the gem and installed again with BUNDLE_DEPLOYMENT=true, and a new marker showed up 50 seconds later, this time under app/vendor/bundle. So
deployment mode runs extconf.rb too. (Since Bundler 4.0, the --frozen and --deployment flags are gone, so use the config settings or their
environment variables.)
extconf.rb isn’t the only way a gem can run code you didn’t ask for. A gem can also ship a rubygems_plugin.rb, which RubyGems installs and then loads
on later gem commands, and anything at the top level of a file in lib/ runs when that file is required. The StubMaker gems didn’t use either path.
Checks that would have caught it
We’ll go through these roughly from cheapest to most disruptive. We ran each one against the demo app, and where it was safe to do so, against the real StubMaker names.
A near-miss name check during review
The earliest point anyone could have noticed l18n was the lockfile diff, so that’s where the first check goes. We wrote a small script for the
demo, script/near_miss.rb , that compares every gem name in
a Gemfile.lock with the other names in it and with a list of trusted gems (the top 100 gems by downloads, plus names someone has already reviewed).
This is the part that decides whether two names are too close, with the Damerau-Levenshtein distance method left out:
# Collapse characters that look alike: 1/l/i become "l", 0 becomes "o".
def homoglyphs(name) = name.downcase.tr("1i0", "llo")
def reason(name, known)
return "homoglyph" if homoglyphs(name) == homoglyphs(known)
dist = distance(name, known)
"distance #{dist}" if dist <= 2 && [name, known].all? { |n| n.size >= 6 }
end
lockfile = File.read(ARGV.fetch(0) { abort "usage: #{$0} path/to/Gemfile.lock" })
names = lockfile.scan(/^ ([^\s(]+) \(/).flatten.uniq
trusted = File.readlines(File.join(__dir__, "trusted_gems.txt"), chomp: true)
.reject { |line| line.empty? || line.start_with?("#") }
seen = Set.new
flagged = false
names.product((names + trusted).uniq).each do |name, known|
next if name == known || !seen.add?([name, known].sort)
next if trusted.include?(name) && trusted.include?(known)
if (why = reason(name, known))
name, known = known, name if trusted.include?(name)
puts "#{name} ~ #{known} (#{why})"
flagged = true
end
end
exit(flagged ? 1 : 0)
A pair gets flagged when the names are identical after swapping lookalike characters, or when both names are at least six characters long and two edits
or fewer apart. The six-character floor is there because short names like rake, rack and rails are all within two edits of each other. A pair
is only skipped when both names are trusted, so trusting a popular gem never hides a lookalike of it.
On the PR branch, it flags the demo gem and nothing else:
$ ruby script/near_miss.rb app/Gemfile.lock
l18n ~ i18n (homoglyph)
We also ran it against the Gemfile.lock of the app that serves this blog, with only the top 100 gems trusted. It flagged four pairs, all
harmless: jbuilder ~ builder, faraday-em_http ~ faraday-net_http, net-imap ~ net-smtp and webmock ~ webrick. The cost is that a person has
to look at each flagged pair once and add the names to the trusted list. On a stock Rails 8.1 lockfile, it flagged nine pairs before we did that.
This script is an illustration, not something to drop into a production pipeline as-is. It flags activesupmport, brumdler, ubnlder and ubnuler,
but every i18n and rake lookalike (and joxn) gets past it, because i18n and rake are shorter than six characters and names like i18om aren’t
simple character swaps. It also knows nothing about a gem beyond its name, so a version you’d rely on would probably look at a gem’s age and download
count as well.
So the script can point at a suspicious name, but a person reading the lockfile diff is the actual check. Also check how your CI reports a failure like this. The near-miss job failed on the demo PR, and GitHub still showed it as “Able to merge”:

A red check only blocks a merge when branch protection requires it. This applies no matter who or what wrote the Gemfile line, a person, a generator
or a coding agent: someone has to check the new name against the lockfile before it’s merged.
You don’t have to maintain a script like ours, and we didn’t run the following tools against the demo.
Socket scans Gemfile.lock and analyzes what a gem’s code does, rather
than waiting for someone to file an advisory. Andrew Nesbitt’s typosquatting gem generates lookalike names
for a package and checks which of them are registered, and can scan an SBOM for them.
osv-scanner next to bundler-audit
We’d still recommend running bundler-audit in CI, but it can’t help with a gem like this. It checks your lockfile against ruby-advisory-db , and nobody files an advisory for a gem nobody has reported yet. On the demo PR, it passed:
$ bundler-audit check --update
ruby-advisory-db:
advisories: 1414 advisories
last updated: 2026-11-30 08:26:25 +0100
commit: c31890ba65ef0ee6d07c6606fba3ffe83a676cf3
No vulnerabilities found
It also passed on a lockfile listing the ten real StubMaker names, which we wrote by hand and never ran gem or bundle against.
osv-scanner reads the same lockfile and checks it against OSV, which includes the OpenSSF malicious-packages records. Running version 2.7.1 against the hand-written lockfile reported all ten and exited with status 1:
$ osv-scanner scan source --lockfile Gemfile.lock
Total 10 packages affected by 10 known vulnerabilities (0 Critical, 0 High, 0 Medium, 0 Low, 10 Unknown) from 1 ecosystem.
0 vulnerabilities can be fixed.
+--------------------------------+------+-----------+----------------+---------+---------------+--------------+
| OSV URL | CVSS | ECOSYSTEM | PACKAGE | VERSION | FIXED VERSION | SOURCE |
+--------------------------------+------+-----------+----------------+---------+---------------+--------------+
| https://osv.dev/MAL-2026-20630 | | RubyGems | activesupmport | 0.1.0 | -- | Gemfile.lock |
| https://osv.dev/MAL-2026-20631 | | RubyGems | brumdler | 0.1.0 | -- | Gemfile.lock |
| https://osv.dev/MAL-2026-20632 | | RubyGems | i18om | 0.1.0 | -- | Gemfile.lock |
...
| https://osv.dev/MAL-2026-20639 | | RubyGems | orakw | 0.1.0 | -- | Gemfile.lock |
+--------------------------------+------+-----------+----------------+---------+---------------+--------------+
osv-scanner only knows about these gems because OSV published records on November 25, so it would have stayed quiet for the 102 days before that.
It’s after-the-fact detection: it tells you a gem you already installed has since been reported, which is what you need to start rotating credentials.
GitHub has malware advisories for all fifteen gems too, which Dependabot flags only if you’ve turned on Dependabot malware alerts , a separate setting. We covered how to sort through the advisories these tools report in How to Prioritize Which CVEs to Fix First , and Four AI Stack Risks bundler-audit Won’t Flag looks at other gaps in what bundler-audit can see.
A cooldown
Bundler 4.0.13 added an opt-in cooldown setting that skips gem versions
published within the last given number of days (bundle config set cooldown 7), giving researchers time to catch a malicious release first. We covered
it in our notes from Jenny Shen’s Rails World talk on the Compact Index .
It only helps if the gem is removed inside the window, and neither write-up says when the StubMaker gems were taken down. It also honors an existing lockfile, so it protects you when you add or update a gem, not when CI installs what’s already locked. (We couldn’t demo it, because Bundler never excludes versions with an unknown publish time, and our local gem index doesn’t record one.)
no_build_extension
RubyGems and Bundler 4.1.0, released on November 16, added a setting that skips building native extensions entirely: bundle config set no_build_extension true (or BUNDLE_NO_BUILD_EXTENSION=true), and gem install --no-build-extension for RubyGems.
You can read about it in the pull request that added it and in
Hiroshi Shibata’s write-up of the 4.1 release . It’s
the only check in this list that stops extconf.rb from running at all.
In the demo, it did that: bundle install still exited successfully, printing a “contains native extensions that were not built” line for each affected
gem, and the marker file never appeared. The catch is that the setting applies to every gem, with no way to allow specific ones, and a gem installed without
its extension counts as missing. This is what bundle check said afterwards:

That’s 16 gems in a default Rails 8.1 app, l18n included, but also puma, bootsnap, json and date. Booting the app failed in config/boot.rb
with Bundler::GemNotFound before any application code ran. So for most Rails apps, this isn’t something you can turn on today without a plan for those
gems. And it only stops extconf.rb. A gem that runs its payload when it’s required would still get through, and so would a rubygems_plugin.rb,
unless you also set no_install_plugin, which arrived in the same release.
Conclusion
In this article, we looked at the StubMaker gems, fifteen RubyGems typosquats published in August 2026 whose payload ran from extconf.rb during
bundle install, frozen and deployment installs included. The OSV records that scanners rely on showed up 102 days after OpenSourceMalware found them,
and bundler-audit had nothing on them as of November 30, so for a team relying on its scanners, the lockfile diff was the earliest place to catch one.
None of the checks we covered is enough on its own.
A near-miss name check is cheap, but our script misses most of the real names, so a person still has to read the diff. osv-scanner only finds what
has already been reported. A cooldown depends on how quickly a gem gets pulled, and no_build_extension breaks a default Rails app today.
Next time you review a lockfile diff, read the new names, and check that a failing check actually blocks the merge. For a related problem, code that runs as soon as you open a project in your editor, see Opening a Repo Is Now an Execution Event .
🚨 Not sure what’s in your Gemfile.lock or what other risks can impact your Rails application in production? Let’s talk .