CVE-2016-2338: An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby
CVE-2016-2338 is a critical-severity flaw (CVSS 9.8) affecting ruby, debian linux. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Critical severity
- EPSS top 8%: very likely to be exploited
- Public exploit reference
- Remotely exploitable, no login, no user action
- On your watchlist
A fixed release or distro patch exists.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 4.7% (top 8%) |
| CISA exploited list | No |
| Weakness | CWE-787 |
| Published | 2022-09-29 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Exact fixes by distribution
Public exploits and detection
Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
- GitHub PoC: SpiralBL0CK/CVE-2016-2338-nday (0 stars)
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2016-2338?
ruby: downgrade or apply the listed mitigation; debian linux: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2016-2338 being exploited?
CVE-2016-2338 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2016-2338 affect?
CVE-2016-2338 affects ruby, debian linux. Severity is critical (CVSS 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 objec
How urgent is CVE-2016-2338?
Priority 72/100. Critical severity; EPSS top 8%: very likely to be exploited; Public exploit reference; Remotely exploitable, no login, no user action; On your watchlist
Software pages
Debian vulnerabilities · Ruby vulnerabilities
Related CVEs
- CVE-2026-46727 HIGH 8.1 UPGRADE An issue was discovered in Ruby 4 before 4.0.5
- CVE-2023-28756 MEDIUM 5.3 UPGRADE DOWNGRADE A ReDoS issue was discovered in the Time component through 0.2.1 in Ruby through 3.2.1
- CVE-2022-28739 HIGH 7.5 UPGRADE MITIGATE There is a buffer over-read in Ruby before 2.6.10, 2.7.x before 2.7.6, 3.x before 3.0.4, and 3.1.x before 3.1.
- CVE-2022-28738 CRITICAL 9.8 UPGRADE A double free was found in the Regexp compiler in Ruby 3.x before 3.0.4 and 3.1.x before 3.1.2
- CVE-2021-41819 HIGH 7.5 DOWNGRADE UPGRADE CGI::Cookie.parse in Ruby through 2.6.8 mishandles security prefixes in cookie names