CVE-2016-2338
Reported by certcc · Published February 14, 2020
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 versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| ruby-devel | Amazon Linux | 2.0.0.648-36.amzn2.0.17 |
| rubygem-psych | Amazon Linux | 2.0.0-36.amzn2.0.17 |
| rubygem-io-console | Amazon Linux | 0.4.2-36.amzn2.0.17 |
| rubygems-devel | Amazon Linux | 2.0.14.1-36.amzn2.0.17 |
| ruby-doc | Amazon Linux | 2.0.0.648-36.amzn2.0.17 |
| rubygem-rake | Amazon Linux | 0.9.6-36.amzn2.0.17 |
| ruby2.5 | Ubuntu:18.04:LTS | 2.5.1-1ubuntu1.6 |
| ruby2.3 | Ubuntu:16.04:LTS | 2.3.1-2~ubuntu16.04.14 |
| ruby-psych | Ubuntu:18.04:LTS | 2.2.4-6build4 |
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2 | ruby-devel | 0 |
| amazon:2 | rubygem-psych | 0 |
| amazon:2 | rubygem-io-console | 0 |
| amazon:2 | rubygems-devel | 0 |
| amazon:2 | ruby-doc | 0 |
| amazon:2 | rubygem-rake | 0 |
| n/a | n/a | * |
| amazon:2 | ruby-libs | 0 |
| amazon:2 | rubygem-minitest | 0 |
| amazon:2 | ruby-tcltk | 0 |
| amazon:2 | rubygem-json | 0 |
| amazon:2 | rubygem-bigdecimal | 0 |
| amazon:2 | ruby | 0 |
| amazon:2 | ruby-irb | 0 |
| amazon:2 | rubygem-rdoc | 0 |
| amazon:2 | rubygems | 0 |
Timeline
- Feb 14, 2020 CVE Published
- Feb 4, 2022 EPSS Score (30 in total, the first dated here)
- Nov 21, 2024 CVE Updated
- Apr 2, 2026 Security Advisory
- Oct 9, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2016-2338
vulnetix vdb fixes CVE-2016-2338
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2016-2338/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart