CVE-2013-4287 RubyGems Regular Expression Denial of Service vulnerability

Medium 4.3 Published Updated

Remote attackers can cause denial of service via CPU exhaustion by submitting crafted gem versions that trigger excessive regex backtracking in RubyGems.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2013-4287?

CVE-2013-4287 is a medium-severity denial of service vulnerability in Redhat Enterprise Linux, published on 17 Oct 2013. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Algorithmic complexity vulnerability in Gem::Version::VERSION_PATTERN in lib/rubygems/version.rb in RubyGems before 1.8.23.1, 1.8.24 through 1.8.25, 2.0.x before 2.0.8, and 2.1.x before 2.1.0, 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.

Weakness: CWE-310

Which versions are affected by CVE-2013-4287?

8 open source packages ship an affected version, including rubygems-update. It affects 3 products.

PackageAffectedFixed in
rubygems-update RubyGemsAll versions1.8.23.1
rubygems-update RubyGemsAll versions1.8.23.1
rubygems-update RubyGemsFrom 1.8.241.8.26
rubygems-update RubyGemsFrom 1.8.241.8.26
rubygems-update RubyGemsFrom 2.0.02.0.8
rubygems-update RubyGemsFrom 2.0.02.0.8
2 more packages
rubygems-update RubyGemsFrom 2.1.0.rc.12.1.0
rubygems-update RubyGemsFrom 2.1.0.rc.12.1.0
Linux distribution packages (31)
rubygems Red Hat:openshift:2.0::el6All versions0:1.8.24-5.el6op
rubygems-devel Red Hat:openshift:2.0::el6All versions0:1.8.24-5.el6op
ruby193-ruby Red Hat:openstack:3::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-debuginfo Red Hat:openstack:3::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-devel Red Hat:openstack:3::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-doc Red Hat:openstack:3::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-irb Red Hat:openstack:3::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-libs Red Hat:openstack:3::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-tcltk Red Hat:openstack:3::el6All versions0:1.9.3.448-40.el6
ruby193-rubygem-bigdecimal Red Hat:openstack:3::el6All versions0:1.1.0-40.el6
ruby193-rubygem-io-console Red Hat:openstack:3::el6All versions0:0.3-40.el6
ruby193-rubygem-json Red Hat:openstack:3::el6All versions0:1.5.5-40.el6
ruby193-rubygem-minitest Red Hat:openstack:3::el6All versions0:2.5.1-40.el6
ruby193-rubygem-rake Red Hat:openstack:3::el6All versions0:0.9.2.2-40.el6
ruby193-rubygems Red Hat:openstack:3::el6All versions0:1.8.24-9.el6ost
ruby193-rubygems-devel Red Hat:openstack:3::el6All versions0:1.8.24-9.el6ost
ruby193-ruby Red Hat:rhel_software_collections:1::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-debuginfo Red Hat:rhel_software_collections:1::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-devel Red Hat:rhel_software_collections:1::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-doc Red Hat:rhel_software_collections:1::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-irb Red Hat:rhel_software_collections:1::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-libs Red Hat:rhel_software_collections:1::el6All versions0:1.9.3.448-40.el6
ruby193-ruby-tcltk Red Hat:rhel_software_collections:1::el6All versions0:1.9.3.448-40.el6
ruby193-rubygem-bigdecimal Red Hat:rhel_software_collections:1::el6All versions0:1.1.0-40.el6
ruby193-rubygem-io-console Red Hat:rhel_software_collections:1::el6All versions0:0.3-40.el6
ruby193-rubygem-json Red Hat:rhel_software_collections:1::el6All versions0:1.5.5-40.el6
ruby193-rubygem-minitest Red Hat:rhel_software_collections:1::el6All versions0:2.5.1-40.el6
ruby193-rubygem-rake Red Hat:rhel_software_collections:1::el6All versions0:0.9.2.2-40.el6
ruby193-rubygem-rdoc Red Hat:rhel_software_collections:1::el6All versions0:3.9.5-40.el6
ruby193-rubygems Red Hat:rhel_software_collections:1::el6All versions0:1.8.23-40.el6
ruby193-rubygems-devel Red Hat:rhel_software_collections:1::el6All versions0:1.8.23-40.el6

Products include Redhat Enterprise Linux, Ruby-Lang Ruby, Rubygems Rubygems.

How do I fix CVE-2013-4287?

Upgrade rubygems-update to a fixed version for your release line: 1.8.23.1, 1.8.26, 2.0.8 or 2.1.0.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2013-4287 being exploited?

There is no known exploitation of CVE-2013-4287 in the wild and no public exploit code.

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2013-4287, GHSA-9j7m-rjqx-48vh, RHSA-2013:1427, RHSA-2013:1523, RHSA-2014:0207.

Is CVE-2013-4287 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free