{"id":"UBUNTU-CVE-2016-2338","details":"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.","modified":"2025-07-16T08:12:06.954164Z","published":"2022-09-29T03:15:00Z","withdrawn":"2025-07-18T16:43:26Z","upstream":["CVE-2016-2338"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2016-2338"},{"type":"REPORT","url":"http://www.talosintelligence.com/reports/TALOS-2016-0032/"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2016-2338"}],"affected":[{"package":{"name":"ruby2.3","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/ruby2.3@2.3.1-2~ubuntu16.04.14?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.1-2~ubuntu16.04.14"}]}],"versions":["2.3.0-1","2.3.0-2","2.3.0-4ubuntu2","2.3.0-4ubuntu3","2.3.0-5ubuntu1","2.3.1-2~16.04","2.3.1-2~16.04.2","2.3.1-2~16.04.4","2.3.1-2~16.04.5","2.3.1-2~16.04.6","2.3.1-2~16.04.7","2.3.1-2~16.04.9","2.3.1-2~16.04.10","2.3.1-2~16.04.11","2.3.1-2~16.04.12","2.3.1-2~ubuntu16.04.13"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libruby2.3","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"libruby2.3-dbg","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"libruby2.3-dbgsym","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"ruby2.3","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"ruby2.3-dbgsym","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"ruby2.3-dev","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"ruby2.3-dev-dbgsym","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"ruby2.3-doc","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"ruby2.3-tcltk","binary_version":"2.3.1-2~ubuntu16.04.14"},{"binary_name":"ruby2.3-tcltk-dbgsym","binary_version":"2.3.1-2~ubuntu16.04.14"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2016/UBUNTU-CVE-2016-2338.json"}},{"package":{"name":"ruby-psych","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/ruby-psych@2.2.4-6build4?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.4-6build4"}]}],"versions":["2.2.4-6build2","2.2.4-6build3"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"2.2.4-6build4","binary_name":"libpsych-java"},{"binary_name":"ruby-psych","binary_version":"2.2.4-6build4"},{"binary_name":"ruby-psych-dbgsym","binary_version":"2.2.4-6build4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2016/UBUNTU-CVE-2016-2338.json"}},{"package":{"name":"ruby2.5","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/ruby2.5@2.5.1-1ubuntu1.6?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.1-1ubuntu1.6"}]}],"versions":["2.5.0~preview1-1ubuntu2","2.5.0-4ubuntu1","2.5.0-4ubuntu4","2.5.0-5ubuntu1","2.5.0-6ubuntu1","2.5.1-1ubuntu1","2.5.1-1ubuntu1.1","2.5.1-1ubuntu1.2","2.5.1-1ubuntu1.4","2.5.1-1ubuntu1.5"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libruby2.5","binary_version":"2.5.1-1ubuntu1.6"},{"binary_name":"libruby2.5-dbgsym","binary_version":"2.5.1-1ubuntu1.6"},{"binary_name":"ruby2.5","binary_version":"2.5.1-1ubuntu1.6"},{"binary_name":"ruby2.5-dbgsym","binary_version":"2.5.1-1ubuntu1.6"},{"binary_name":"ruby2.5-dev","binary_version":"2.5.1-1ubuntu1.6"},{"binary_name":"ruby2.5-doc","binary_version":"2.5.1-1ubuntu1.6"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2016/UBUNTU-CVE-2016-2338.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}