CVE-2016-2339 Memory corruption in Ruby

Critical 9.8 Published Updated

A heap overflow in Ruby's Fiddle library allows attackers to execute arbitrary code or cause denial of service via crafted arguments.

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

What is CVE-2016-2339?

CVE-2016-2339 is a critical memory corruption vulnerability in Ruby-Lang Ruby, published on 6 Jan 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An exploitable heap overflow vulnerability exists in the Fiddle::Function.new "initialize" function functionality of Ruby. In Fiddle::Function.new "initialize" heap buffer "arg_types" allocation is made based on args array length. Specially constructed object passed as element of args array can increase this array size after mentioned allocation and cause heap overflow.

Weakness: CWE-119

Which versions are affected by CVE-2016-2339?

It affects 1 product.

Linux distribution packages (2)
ruby19 SUSE:Studio Onsite 1.3All versions1.9.3.p392-0.26.1
ruby19 SUSE:Studio Onsite Runner 1.3All versions1.9.3.p392-0.26.1

Products include Ruby-Lang Ruby.

How do I fix CVE-2016-2339?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2016-2339 being exploited?

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

All Ruby-Lang Ruby vulnerabilities

Sources

Also known as CLSA-2025-1758023679, GHSA-c4w7-m676-pcvp, SUSE-SU-2017:0914-1, UBUNTU-CVE-2016-2339.

Is CVE-2016-2339 in your software?

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

Check your SBOMs for free