Skip to content
OpenAdvisories
Unscored Public exploit CVE-2016-2338 EUVD-2016-3422GHSA-r46x-xjwr-8v2g

An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document f…

Published Feb 14, 2020 · Updated Aug 5, 2024 · Assigned by certcc

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 8 ruby2.1 2.1.5-2+deb8u9 DLA-2158-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 ruby +5 2.0.0.648-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygem-bigdecimal 1.2.0-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygem-io-console 0.4.2-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygem-json 1.7.7-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygem-minitest 4.3.2-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygem-psych 2.0.0-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygem-rake 0.9.6-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygem-rdoc 4.0.0-36.amzn2.0.17 ALAS2-2025-2990
Amazon Linux 2 rubygems +1 2.0.14.1-36.amzn2.0.17 ALAS2-2025-2990

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 2

References