CVE-2021-28834 Remote code execution in Kramdown

Critical 9.8 Published Updated

Attackers can execute arbitrary code by instantiating unauthorized classes via the Rouge formatter interface in the Kramdown library.

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

What is CVE-2021-28834?

CVE-2021-28834 is a critical code injection vulnerability in Debian Debian Linux, published on 19 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Kramdown before 2.3.1 does not restrict Rouge formatters to the Rouge::Formatters namespace, and thus arbitrary classes can be instantiated.

Which versions are affected by CVE-2021-28834?

2 open source packages ship an affected version, including kramdown. It affects 3 products.

PackageAffectedFixed in
kramdown RubyGemsFrom 1.16.02.3.1
kramdown RubyGemsFrom 1.16.02.3.1

Products include Debian Debian Linux, Fedoraproject Fedora, Kramdown Project Kramdown.

How do I fix CVE-2021-28834?

Upgrade kramdown to 2.3.1 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2021-28834 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-28834, DSA-4890-1, GHSA-52p9-v744-mwjj, OESA-2021-1159, UBUNTU-CVE-2021-28834, USN-6424-1.

Is CVE-2021-28834 in your software?

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

Check your SBOMs for free