Every CVE Search/ Get API key

CVE-2016-2339

An exploitable heap overflow vulnerability exists in the Fiddle::Function.new "initialize"...

9.8 CriticalFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

5.14%Up 4.2 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 9.8

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.

Record
CVE-2016-2339
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-119
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2016-2339
Updated
2026-11-02
EUVDEUVD-2016-3423 No score

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.

Record
EUVD-2016-3423
Updated
2026-11-03
GitHub AdvisoriesGHSA-c4w7-m676-pcvp 9.8

An exploitable heap overflow vulnerability exists in the Fiddle::Function.new "initialize"...

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.

Record
GHSA-c4w7-m676-pcvp
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-119
Updated
2026-11-02
OSV 9.8

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.

Record
CVE-2016-2339
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2016-2339 9.8

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.

Record
UBUNTU-CVE-2016-2339
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 6 moreShow less
OSVCLSA-2025-1758023679 No score

ruby: Fix of CVE-2016-2339

  • CVE-2016-2339: fix heap overflow vulnerability in Fiddle::Function.new 'initialize' function
Record
CLSA-2025-1758023679
Updated
2026-11-02
OSVMGASA-2017-0290 No score

Updated ruby packages fix security vulnerabilities

It was discovered that Ruby Net::SMTP incorrectly handled CRLF sequences. A remote attacker could possibly use this issue to inject SMTP commands. (CVE-2015-9096)

Marcin Noga discovered that Ruby incorrectly handled certain arguments in a TclTkIp class method. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-2337)

It was discovered that Ruby Fiddle::Function.new incorrectly handled certain arguments. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-2339)

Record
MGASA-2017-0290
Updated
2026-11-02
OSVSUSE-SU-2017:0914-1 No score

Security update for ruby19

This update for ruby19 fixes the following issues:

Security issue fixed:

  • CVE-2016-2339: heap overflow vulnerability in the Fiddle::Function.new'initialize' (bsc#1018808)

Bugfixes:

  • fix small mistake in the backport for (bsc#986630)
  • HTTP Header injection in 'net/http' (bsc#986630)
  • make the testsuite work with our new openssl requirements
Record
SUSE-SU-2017:0914-1
Updated
2026-11-02
OSVSUSE-SU-2017:1067-1 No score

Security update for ruby2.1

This ruby2.1 update to version 2.1.9 fixes the following issues:

Security issues fixed:

  • CVE-2016-2339: heap overflow vulnerability in the Fiddle::Function.new'initialize' (bsc#1018808)
  • CVE-2015-7551: Unsafe tainted string usage in Fiddle and DL (bsc#959495)
  • CVE-2015-3900: hostname validation does not work when fetching gems or making API requests (bsc#936032)
  • CVE-2015-1855: Ruby'a OpenSSL extension suffers a vulnerability through overly permissive matching of hostnames (bsc#926974)
  • CVE-2014-4975: off-by-one stack-based buffer overflow in the encodes() function (bsc#887877)

Bugfixes:

  • SUSEconnect doesn't handle domain wildcards in no_proxy environment variable properly (bsc#1014863)
  • Segmentation fault after pack & ioctl & unpack (bsc#909695)
  • Ruby:HTTP Header injection in 'net/http' (bsc#986630)

ChangeLog:

Record
SUSE-SU-2017:1067-1
Updated
2026-11-02
OSVSUSE-SU-2020:1570-1 No score

Security update for ruby2.1

This update for ruby2.1 fixes the following issues:

Security issues fixed:

  • CVE-2015-9096: Fixed an SMTP command injection via CRLFsequences in a RCPT TO or MAIL FROM command (bsc#1043983).
  • CVE-2016-7798: Fixed an IV Reuse in GCM Mode (bsc#1055265).
  • CVE-2017-0898: Fixed a buffer underrun vulnerability in Kernel.sprintf (bsc#1058755).
  • CVE-2017-0899: Fixed an issue with malicious gem specifications, insufficient sanitation when printing gem specifications could have included terminal characters (bsc#1056286).
  • CVE-2017-0900: Fixed an issue with malicious gem specifications, the query command could have led to a denial of service attack against clients (bsc#1056286).
  • CVE-2017-0901: Fixed an issue with malicious gem specifications, potentially overwriting arbitrary files on the client system (bsc#1056286).
  • CVE-2017-0902: Fixed an issue with malicious gem specifications, that could have enabled MITM attacks against clients (bsc#1056286).
  • CVE-2017-0903: Fixed an unsafe object deserialization vulnerability (bsc#1062452).
  • CVE-2017-9228: Fixed a heap out-of-bounds write in bitset_set_range() during regex compilation (bsc#1069607).
  • CVE-2017-9229: Fixed an invalid pointer dereference in left_adjust_char_head() in oniguruma (bsc#1069632).
  • CVE-2017-10784: Fixed an escape sequence injection vulnerability in the Basic authentication of WEBrick (bsc#1058754).
  • CVE-2017-14033: Fixed a buffer underrun vulnerability in OpenSSL ASN1 decode (bsc#1058757).
  • CVE-2017-14064: Fixed an arbitrary memory exposure during a JSON.generate call (bsc#1056782).
  • CVE-2017-17405: Fixed a command injection vulnerability in Net::FTP (bsc#1073002).
  • CVE-2017-17742: Fixed an HTTP response splitting issue in WEBrick (bsc#1087434).
  • CVE-2017-17790: Fixed a command injection in lib/resolv.rb:lazy_initialize() (bsc#1078782).
  • CVE-2018-6914: Fixed an unintentional file and directory creation with directory traversal in tempfile and tmpdir (bsc#1087441).
  • CVE-2018-8777: Fixed a potential DoS caused by large requests in WEBrick (bsc#1087436).
  • CVE-2018-8778: Fixed a buffer under-read in String#unpack (bsc#1087433).
  • CVE-2018-8779: Fixed an unintentional socket creation by poisoned NUL byte in UNIXServer and UNIXSocket (bsc#1087440).
  • CVE-2018-8780: Fixed an unintentional directory traversal by poisoned NUL byte in Dir (bsc#1087437).
  • CVE-2018-16395: Fixed an issue with OpenSSL::X509::Name equality checking (bsc#1112530).
  • CVE-2018-16396: Fixed an issue with tainted string handling, where the flag was not propagated in Array#pack and String#unpack with some directives (bsc#1112532).
  • CVE-2018-1000073: Fixed a path traversal issue (bsc#1082007).
  • CVE-2018-1000074: Fixed an unsafe object deserialization vulnerability in gem owner, allowing arbitrary code execution with specially crafted YAML (bsc#1082008).
  • CVE-2018-1000075: Fixed an infinite loop vulnerability due to negative size in tar header causes Denial of Service (bsc#1082014).
  • CVE-2018-1000076: Fixed an improper verification of signatures in tarballs (bsc#1082009).
  • CVE-2018-1000077: Fixed an improper URL validation in the homepage attribute of ruby gems (bsc#1082010).
  • CVE-2018-1000078: Fixed a XSS vulnerability in the homepage attribute when displayed via gem server (bsc#1082011).
  • CVE-2018-1000079: Fixed a path traversal issue during gem installation allows to write to arbitrary filesystem locations (bsc#1082058).
  • CVE-2019-8320: Fixed a directory traversal issue when decompressing tar files (bsc#1130627).
  • CVE-2019-8321: Fixed an escape sequence injection vulnerability in verbose (bsc#1130623).
  • CVE-2019-8322: Fixed an escape sequence injection vulnerability in gem owner (bsc#1130622).
  • CVE-2019-8323: Fixed an escape sequence injection vulnerability in API response handling (bsc#1130620).
  • CVE-2019-8324: Fixed an issue with malicious gems that may have led to arbitrary code execution (bsc#1130617).
  • CVE-2019-8325: Fixed an escape sequence injection vulnerability in…
Record
SUSE-SU-2020:1570-1
Updated
2026-11-02
OSVUSN-3365-1 No score

ruby1.9.1, ruby2.0, ruby2.3 vulnerabilities

It was discovered that Ruby DL::dlopen incorrectly handled opening libraries. An attacker could possibly use this issue to open libraries with tainted names. This issue only applied to Ubuntu 14.04 LTS. (CVE-2009-5147)

Tony Arcieri, Jeffrey Walton, and Steffan Ullrich discovered that the Ruby OpenSSL extension incorrectly handled hostname wildcard matching. This issue only applied to Ubuntu 14.04 LTS. (CVE-2015-1855)

Christian Hofstaedtler discovered that Ruby Fiddle::Handle incorrectly handled certain crafted strings. An attacker could use this issue to cause a denial of service, or possibly execute arbitrary code. This issue only applied to Ubuntu 14.04 LTS. (CVE-2015-7551)

It was discovered that Ruby Net::SMTP incorrectly handled CRLF sequences. A remote attacker could possibly use this issue to inject SMTP commands. (CVE-2015-9096)

Marcin Noga discovered that Ruby incorrectly handled certain arguments in a TclTkIp class method. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-2337)

It was discovered that Ruby Fiddle::Function.new incorrectly handled certain arguments. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-2339)

It was discovered that Ruby incorrectly handled the initialization vector (IV) in GCM mode. An attacker could possibly use this issue to bypass encryption. (CVE-2016-7798)

Record
USN-3365-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
ruby
TuxCare:CentOS:7
before 2.0.0.648-39.el7_9.tuxcare.els10
2.0.0.648-39.el7_9.tuxcare.els10
ruby-devel
TuxCare:CentOS:7
before 2.0.0.648-39.el7_9.tuxcare.els10
2.0.0.648-39.el7_9.tuxcare.els10
ruby-doc
TuxCare:CentOS:7
before 2.0.0.648-39.el7_9.tuxcare.els10
2.0.0.648-39.el7_9.tuxcare.els10
ruby-irb
TuxCare:CentOS:7
before 2.0.0.648-39.el7_9.tuxcare.els10
2.0.0.648-39.el7_9.tuxcare.els10
ruby-libs
TuxCare:CentOS:7
before 2.0.0.648-39.el7_9.tuxcare.els10
2.0.0.648-39.el7_9.tuxcare.els10
ruby-tcltk
TuxCare:CentOS:7
before 2.0.0.648-39.el7_9.tuxcare.els10
2.0.0.648-39.el7_9.tuxcare.els10
rubygem-bigdecimal
TuxCare:CentOS:7
before 1.2.0-39.el7_9.tuxcare.els10
1.2.0-39.el7_9.tuxcare.els10
rubygem-io-console
TuxCare:CentOS:7
before 0.4.2-39.el7_9.tuxcare.els10
0.4.2-39.el7_9.tuxcare.els10
rubygem-json
TuxCare:CentOS:7
before 1.7.7-39.el7_9.tuxcare.els10
1.7.7-39.el7_9.tuxcare.els10
rubygem-minitest
TuxCare:CentOS:7
before 4.3.2-39.el7_9.tuxcare.els10
4.3.2-39.el7_9.tuxcare.els10
Show 45 moreShow less
Affected packages
PackageAffectedFixed
rubygem-psych
TuxCare:CentOS:7
before 2.0.0-39.el7_9.tuxcare.els10
2.0.0-39.el7_9.tuxcare.els10
rubygem-rake
TuxCare:CentOS:7
before 0.9.6-39.el7_9.tuxcare.els10
0.9.6-39.el7_9.tuxcare.els10
rubygem-rdoc
TuxCare:CentOS:7
before 4.0.0-39.el7_9.tuxcare.els10
4.0.0-39.el7_9.tuxcare.els10
rubygems
TuxCare:CentOS:7
before 2.0.14.1-39.el7_9.tuxcare.els10
2.0.14.1-39.el7_9.tuxcare.els10
rubygems-devel
TuxCare:CentOS:7
before 2.0.14.1-39.el7_9.tuxcare.els10
2.0.14.1-39.el7_9.tuxcare.els10
ruby2.1
Debian:8
From an advisory covering 25 CVEs
before 2.1.5-2+deb8u4, plus listed versions
2.1.5-22.1.5-2+deb8u12.1.5-2+deb8u22.1.5-2+deb8u3
2.1.5-2+deb8u4
ruby
Mageia:5
From an advisory covering 3 CVEs
before 2.0.0.p648-1.4.mga5
2.0.0.p648-1.4.mga5
ruby
Mageia:6
From an advisory covering 3 CVEs
before 2.2.7-1.mga6
2.2.7-1.mga6
ruby19
SUSE:Studio Onsite 1.3
before 1.9.3.p392-0.26.1
1.9.3.p392-0.26.1
ruby19
SUSE:Studio Onsite Runner 1.3
before 1.9.3.p392-0.26.1
1.9.3.p392-0.26.1
ruby2.1
SUSE:Linux Enterprise Desktop 12 SP1
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Desktop 12 SP2
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Software Development Kit 12 SP1
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Software Development Kit 12 SP2
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Server 12 SP1
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Server 12 SP2
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
From an advisory covering 5 CVEs
before 2.1.9-15.1
2.1.9-15.1
ruby2.1
SUSE:HPE Helion OpenStack 8
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:OpenStack Cloud 7
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
yast2-ruby-bindings
SUSE:OpenStack Cloud 7
From an advisory covering 42 CVEs
before 3.1.53-9.8.1
3.1.53-9.8.1
ruby2.1
SUSE:OpenStack Cloud 8
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:OpenStack Cloud Crowbar 8
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
yast2-ruby-bindings
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
From an advisory covering 42 CVEs
before 3.1.53-9.8.1
3.1.53-9.8.1
ruby2.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Software Development Kit 12 SP4
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Software Development Kit 12 SP5
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Server 12 SP2-LTSS
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
yast2-ruby-bindings
SUSE:Linux Enterprise Server 12 SP2-LTSS
From an advisory covering 42 CVEs
before 3.1.53-9.8.1
3.1.53-9.8.1
ruby2.1
SUSE:Linux Enterprise Server 12 SP2-BCL
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
yast2-ruby-bindings
SUSE:Linux Enterprise Server 12 SP2-BCL
From an advisory covering 42 CVEs
before 3.1.53-9.8.1
3.1.53-9.8.1
ruby2.1
SUSE:Linux Enterprise Server 12 SP3-LTSS
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Server 12 SP3-BCL
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Server 12 SP4
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Server 12 SP5
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby2.1
SUSE:Enterprise Storage 5
From an advisory covering 42 CVEs
before 2.1.9-19.3.2
2.1.9-19.3.2
ruby1.9.1
Ubuntu:14.04:LTS
before 1.9.3.484-2ubuntu1.3, plus listed versions
1.9.3.194-8.1ubuntu21.9.3.448-1ubuntu11.9.3.448-1ubuntu21.9.3.484-1ubuntu11.9.3.484-1ubuntu21.9.3.484-2ubuntu11.9.3.484-2ubuntu1.11.9.3.484-2ubuntu1.2
1.9.3.484-2ubuntu1.3
ruby2.0
Ubuntu:14.04:LTS
before 2.0.0.484-1ubuntu2.4, plus listed versions
2.0.0.299-22.0.0.343-12.0.0.343-1ubuntu12.0.0.353-12.0.0.353-1ubuntu1
Show 4 moreShow less
2.0.0.484-1ubuntu12.0.0.484-1ubuntu22.0.0.484-1ubuntu2.12.0.0.484-1ubuntu2.2
2.0.0.484-1ubuntu2.4
ruby1.9.1
Ubuntu:14.04:LTS
From an advisory covering 7 CVEs
before 1.9.3.484-2ubuntu1.3, plus listed versions
1.9.3.194-8.1ubuntu21.9.3.448-1ubuntu11.9.3.448-1ubuntu21.9.3.484-1ubuntu11.9.3.484-1ubuntu21.9.3.484-2ubuntu11.9.3.484-2ubuntu1.11.9.3.484-2ubuntu1.2
1.9.3.484-2ubuntu1.3
ruby2.0
Ubuntu:14.04:LTS
From an advisory covering 7 CVEs
before 2.0.0.484-1ubuntu2.4, plus listed versions
2.0.0.299-22.0.0.343-12.0.0.343-1ubuntu12.0.0.353-12.0.0.353-1ubuntu1
Show 4 moreShow less
2.0.0.484-1ubuntu12.0.0.484-1ubuntu22.0.0.484-1ubuntu2.12.0.0.484-1ubuntu2.2
2.0.0.484-1ubuntu2.4
ruby2.3
Ubuntu:16.04:LTS
From an advisory covering 7 CVEs
before 2.3.1-2~16.04.2, plus listed versions
2.3.0-12.3.0-22.3.0-4ubuntu22.3.0-4ubuntu32.3.0-5ubuntu12.3.1-2~16.04
2.3.1-2~16.04.2

History

History
RecordedChangedSources
affected, facts
aliases, productsEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2016-2339 is a critical vulnerability (CVSS 9.8) in Hackerone Ruby, published January 6, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 5.14%, the 92nd percentile. Fixed in ruby 2.0.0.648-39.el7_9.tuxcare.els10.

References

Show 109 moreShow less
This page doesn't list everything

Left out here: the rest of 1 source description. The JSON record has them.

MoveEnter Open