CVE-2016-2338 Memory corruption in n/a

Critical 9.8 Published Updated

A heap overflow in Ruby's Psych library allows attackers to execute arbitrary code via specially constructed objects.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2016-2338?

CVE-2016-2338 is a critical memory corruption vulnerability in Debian Debian Linux, published on 14 Feb 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-787

Which versions are affected by CVE-2016-2338?

It affects 2 products.

Products include Debian Debian Linux, Ruby-Lang Ruby.

How do I fix CVE-2016-2338?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2016-2338 being exploited?

There is no known exploitation of CVE-2016-2338 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as CLSA-2025-1757699919, DLA-2158-1, GHSA-r46x-xjwr-8v2g.

Is CVE-2016-2338 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free