MediumGHSA-9qvm-2vhf-q649CVE-2013-4363

RubyGems Regular Expression Denial of Service

Published 17 May 2022 · Updated 29 Nov 2024

Is your project on an affected rubygems-update?

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

Affected packages

Affected
<1.8.23.2
Fixed in
1.8.23.2
Update to the fixed version for your release line, for example:bundle update --conservative rubygems-update # Gemfile: '>= 1.8.23.2'
Affected
>=1.8.24 <1.8.27
Fixed in
1.8.27
Update to the fixed version for your release line, for example:bundle update --conservative rubygems-update # Gemfile: '>= 1.8.27'
Affected
>=2.0.0 <2.0.10
Fixed in
2.0.10
Update to the fixed version for your release line, for example:bundle update --conservative rubygems-update # Gemfile: '>= 2.0.10'
Affected
>=2.1.0 <2.1.5
Fixed in
2.1.5
Update to the fixed version for your release line, for example:bundle update --conservative rubygems-update # Gemfile: '>= 2.1.5'

Details

Algorithmic complexity vulnerability in Gem::Version::ANCHORED_VERSION_PATTERN in lib/rubygems/version.rb in RubyGems before 1.8.23.2, 1.8.24 through 1.8.26, 2.0.x before 2.0.10, and 2.1.x before 2.1.5, as used in Ruby 1.9.0 through 2.0.0p247, allows remote attackers to cause a denial of service (CPU consumption) via a crafted gem version that triggers a large amount of backtracking in a regular expression. NOTE: this issue is due to an incomplete fix for CVE-2013-4287.

Is GHSA-9qvm-2vhf-q649 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected rubygems-update, and gives you the command that fixes it.

More advisories for rubygems-update

  • MediumCVE-2012-2125RubyGems HTTPS to HTTP redirect · 17 May 2022
  • MediumCVE-2012-2126RubyGems does not verify SSL certificate · 17 May 2022
  • MediumCVE-2015-4020RubyGems Improper Input Validation vulnerability · 17 May 2022
  • MediumCVE-2018-1000079RubyGems Path Traversal vulnerability · 14 May 2022
  • HighCVE-2015-3900RubyGems vulnerable to DNS hijack attack · 14 May 2022
  • MediumCVE-2013-4287RubyGems Regular Expression Denial of Service vulnerability · 14 May 2022
All 25 advisories for rubygems-update

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.