CVE-2021-28834

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

published March 19, 2021

CVSS
โ€”
EPSS
3%
Percentile
85.8
In the wild
Unconfirmed
What it is

โš ๏ธ A sneaky flaw in Kramdown lets arbitrary classes escape the namespace! ๐Ÿ™ˆ Think of it like a restaurant that lets anyone walk into the kitchen and cook, regardless of their culinary skills. With Kramdown, an attacker could potentially whip up something uninvited from anywhere, not just the approved recipes. This could lead to unexpected behavior or even malicious code execution within your application. If attackers can instantiate arbitrary classes, the consequences can be both unpredictable and dangerous โ€” like serving a surprise dish that no one ordered!

Put simply

Think of it like a restaurant that lets anyone walk into the kitchen and cook, regardless of their culinary skills. With Kramdown, an attacker could potentially whip up something uninvited from anywhere, not just the approved recipes. CVE-2021-28834 reveals that Kramdown versions prior to 2.3.1 do not restrict formatters to the Rouge::Formatters namespace. This oversight allows attackers to create instances of any class, bypassing intended restrictions.

What to do

This could lead to unexpected behavior or even malicious code execution within your application. If attackers can instantiate arbitrary classes, the consequences can be both unpredictable and dangerous โ€” like serving a surprise dish that no one ordered! Upgrade Kramdown to version 2.3.1 or later to prevent this issue. It's crucial to audit any custom formatters you've implemented to ensure they don't expose your application to these risks. You've got this! With a quick upgrade, you'll secure your application in no time. ๐Ÿ›ก๏ธ

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.02695 ยท 85.8th percentile
Published
2021-03-19T06:51Z
EPSS history
Timeline
  • 19 MAR 06:51Z
    Kramdown before 2.3.1 does not restrict Rouge formatters to the Rouge::Formatters namespace, and thus arbitrary classes can be instantiated
    cvelistv5