CVE-2016-2338
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function...
CVE-2016-2338 is a critical vulnerability (CVSS 9.8) in Ruby-lang Ruby, published February 14, 2020. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 4.74%, the 91st percentile. Fixed in ruby 2.0.0.648-39.el7_9.tuxcare.els9.
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags 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
What each source reports
NVD Score used
9.8
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.
- Record
CVE-2016-2338- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-787
- Updated
- 2026-11-02
CVE List No score
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.
- Record
CVE-2016-2338- Updated
- 2026-11-02
EUVDEUVD-2016-3422 No score
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.
- Record
EUVD-2016-3422- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-r46x-xjwr-8v2g
9.8
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function...
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.
- Record
GHSA-r46x-xjwr-8v2g- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-787
- Updated
- 2026-11-02
OSV
9.8
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.
- Record
CVE-2016-2338- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-2338
9.8
An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow.
- Record
UBUNTU-CVE-2016-2338- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2025-1757699919 No score
ruby: Fix of CVE-2016-2338
- CVE-2016-2338: fix heap overflow vulnerability in start_document function
- Record
CLSA-2025-1757699919- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rubyTuxCare:CentOS:7 |
before 2.0.0.648-39.el7_9.tuxcare.els9 | 2.0.0.648-39.el7_9.tuxcare.els9 |
ruby-develTuxCare:CentOS:7 |
before 2.0.0.648-39.el7_9.tuxcare.els9 | 2.0.0.648-39.el7_9.tuxcare.els9 |
ruby-docTuxCare:CentOS:7 |
before 2.0.0.648-39.el7_9.tuxcare.els9 | 2.0.0.648-39.el7_9.tuxcare.els9 |
ruby-irbTuxCare:CentOS:7 |
before 2.0.0.648-39.el7_9.tuxcare.els9 | 2.0.0.648-39.el7_9.tuxcare.els9 |
ruby-libsTuxCare:CentOS:7 |
before 2.0.0.648-39.el7_9.tuxcare.els9 | 2.0.0.648-39.el7_9.tuxcare.els9 |
ruby-tcltkTuxCare:CentOS:7 |
before 2.0.0.648-39.el7_9.tuxcare.els9 | 2.0.0.648-39.el7_9.tuxcare.els9 |
rubygem-bigdecimalTuxCare:CentOS:7 |
before 1.2.0-39.el7_9.tuxcare.els9 | 1.2.0-39.el7_9.tuxcare.els9 |
rubygem-io-consoleTuxCare:CentOS:7 |
before 0.4.2-39.el7_9.tuxcare.els9 | 0.4.2-39.el7_9.tuxcare.els9 |
rubygem-jsonTuxCare:CentOS:7 |
before 1.7.7-39.el7_9.tuxcare.els9 | 1.7.7-39.el7_9.tuxcare.els9 |
rubygem-minitestTuxCare:CentOS:7 |
before 4.3.2-39.el7_9.tuxcare.els9 | 4.3.2-39.el7_9.tuxcare.els9 |
Show 6 moreShow less
| Package | Affected | Fixed |
|---|---|---|
rubygem-psychTuxCare:CentOS:7 |
before 2.0.0-39.el7_9.tuxcare.els9 | 2.0.0-39.el7_9.tuxcare.els9 |
rubygem-rakeTuxCare:CentOS:7 |
before 0.9.6-39.el7_9.tuxcare.els9 | 0.9.6-39.el7_9.tuxcare.els9 |
rubygem-rdocTuxCare:CentOS:7 |
before 4.0.0-39.el7_9.tuxcare.els9 | 4.0.0-39.el7_9.tuxcare.els9 |
rubygemsTuxCare:CentOS:7 |
before 2.0.14.1-39.el7_9.tuxcare.els9 | 2.0.14.1-39.el7_9.tuxcare.els9 |
rubygems-develTuxCare:CentOS:7 |
before 2.0.14.1-39.el7_9.tuxcare.els9 | 2.0.14.1-39.el7_9.tuxcare.els9 |
ruby2.1Debian:8 |
before 2.1.5-2+deb8u9, plus listed versions 2.1.5-22.1.5-2+deb8u12.1.5-2+deb8u22.1.5-2+deb8u32.1.5-2+deb8u4 Show 4 moreShow less2.1.5-2+deb8u52.1.5-2+deb8u62.1.5-2+deb8u72.1.5-2+deb8u8 |
2.1.5-2+deb8u9 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | SpiralBL0CK/CVE-2016-2338-nday | 2022-12-19 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | affected | |
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV, PoC in GitHub |
References
lists.debian.org/debian-lts-announce/2020/03/msg00032.html
talosintelligence.com/reports/TALOS-2016-0032
security.netapp.com/advisory/ntap-20221228-0005
nvd.nist.gov/vuln/detail/CVE-2016-2338
github.com/advisories/GHSA-r46x-xjwr-8v2g
errata.tuxcare.com/els_os/centos7els/CLSA-2025-1757699919.html
ubuntu.com/security/CVE-2016-2338
cve.org/CVERecord?id=CVE-2016-2338