Is erb 2.2 vulnerable?

RubyGems · 4 releases from 2.2.0 to 2.2.3 · latest erb is 6.0.7 · checked 18 Nov 2026

Yes: 1 known advisory

Yes. erb 2.2.3, the last 2.2 release, is affected by 1 known security advisory (1 high), including CVE-2026-41316. Upgrade to 4.0.3.1 or later to fix all of them.

Upgrade with:bundle update --conservative erb # Gemfile: '>= 4.0.3.1'

Is your project on an affected erb?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Advisories affecting erb 2.2.3

  • HighCVE-2026-41316GHSA-q339-8rmv-2mhv24 Apr 2026

    ERB has an @_init deserialization guard bypass via def_module / def_method / def_class

    Affected
    <4.0.3.1 · >=4.0.4 <4.0.4.1 · >=5.0.0 <6.0.1.1 · >=6.0.2 <6.0.4
    Fixed in
    4.0.3.1, 4.0.4.1, 6.0.1.1, 6.0.4

Every erb 2.2.x release

Affected: 2.2.0 to 2.2.3. Latest erb: 6.0.7.

VersionKnown advisories
erb 2.2.3CVE-2026-41316
erb 2.2.2CVE-2026-41316
erb 2.2.1CVE-2026-41316
erb 2.2.0CVE-2026-41316

Which of your client projects are still on erb 2.2?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact erb version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other erb versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the RubyGems registry. Refreshed daily.