Skip to main content
Public proof of conceptFix available

CVE-2016-2338

A public proof of concept exists; no exploitation attested.

  • Published2022-09-29
  • WeaknessCWE-787

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2022-09-2903:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-11-03 21:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2016-2338?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2016-2338?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD
Ruby
BranchAffectedFixed in
2.2= 2.2.2no fix published
2.3= 2.3.0no fix published
Debian debian linux
BranchAffectedFixed in
8.0= 8.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • rubyTuxCare:CentOS:7all versions · fixed in 2.0.0.648-39.el7_9.tuxcare.els9and 5 other packages
  • ruby2.1Debian:8all versions · fixed in 2.1.5-2+deb8u9
  • rubygem-bigdecimalTuxCare:CentOS:7all versions · fixed in 1.2.0-39.el7_9.tuxcare.els9
  • rubygem-io-consoleTuxCare:CentOS:7all versions · fixed in 0.4.2-39.el7_9.tuxcare.els9
  • rubygem-jsonTuxCare:CentOS:7all versions · fixed in 1.7.7-39.el7_9.tuxcare.els9
  • rubygem-minitestTuxCare:CentOS:7all versions · fixed in 4.3.2-39.el7_9.tuxcare.els9
  • rubygem-psychTuxCare:CentOS:7all versions · fixed in 2.0.0-39.el7_9.tuxcare.els9
  • rubygem-rakeTuxCare:CentOS:7all versions · fixed in 0.9.6-39.el7_9.tuxcare.els9

2 more package ranges on OSV.dev

Vendor advisories

  • CVE-2016-2338 Red Hat Product Security26 known affected

    ruby: heap buffer overflow in the Psych::Emitter start_document function

    ruby as a component of Red Hat Enterprise Linux 6 · ruby-devel as a component of Red Hat Enterprise Linux 6 · ruby-docs as a component of Red Hat Enterprise Linux 6 · +23 more

Full record on NVD

Fix

  1. No fix planned, says the vendor Red Hat Product Security CVE-2016-2338 · 26 productsOut of support scope

Detection

read 2026-11-02 22:42 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof-of-concept repositories
1 repository, unverifiedSpiralBL0CK/CVE-2016-2338-nday
PoC-in-GitHub
Metasploit modules
none listed
Metasploit Framework

Sources

  • NVDCVSS 3.19.8read 2026-10-23
  • NVDweakness (CWE)CWE-787read 2026-10-23
  • FIRST EPSSEPSS score4.7 %2026-11-03
  • PoC-in-GitHubproof of concept1read 2026-11-02
  • OSVaffected packages—

Identifiers

  • EUVD-2016-3422same flawENISA EUVD · LicenseRef-ENISA-legal-notice
  • DLA-2158-1advisory covering several CVEsDebian · LicenseRef-unstated

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2022-09-29
Last Modified
2026-06-17
NVD status
Modified

Frequently asked questions

What is CVE-2016-2338?

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.

Is CVE-2016-2338 actively exploited?

Active exploitation of CVE-2016-2338 has not been confirmed. Its EPSS score was 4.7% on 2026-11-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2016-2338?

CVE-2016-2338 has a CVSS v3 base score of 9.8 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running Ruby? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record