Every CVE Search/ Get API key

CVE-2021-28834

Remote code execution in Kramdown

9.8 CriticalFix available

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

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.70%Up 1.0 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

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

Record
CVE-2021-28834
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Updated
2026-11-02
CVE List No score

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

Record
CVE-2021-28834
Updated
2026-11-02
EUVDEUVD-2021-0603 No score

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

Record
EUVD-2021-0603
Updated
2026-11-03
GitHub AdvisoriesGHSA-52p9-v744-mwjj 9.8

Remote code execution in Kramdown

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

Record
GHSA-52p9-v744-mwjj
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSV 9.8

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

Record
CVE-2021-28834
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-28834 9.8

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

Record
DEBIAN-CVE-2021-28834
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 10 moreShow less
OSVGHSA-52p9-v744-mwjj 9.8

Remote code execution in Kramdown

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

Record
GHSA-52p9-v744-mwjj
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSVOESA-2021-1159 9.8

rubygem-kramdown security update

The package is fast yet-another-markdown-parser, pure Ruby, using a strict syntax definition and supporting several common extensions.

Security Fix(es):

Kramdown before 2.3.1 does not restrict Rouge formatters to the Rouge::Formatters namespace, and thus arbitrary classes can be instantiated.(CVE-2021-28834)

Record
OESA-2021-1159
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-28834 9.8

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

Record
UBUNTU-CVE-2021-28834
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVopenSUSE-SU-2024:11336-1 No score

ruby2.7-rubygem-kramdown-2.3.1-1.3 on GA media

These are all security issues fixed in the ruby2.7-rubygem-kramdown-2.3.1-1.3 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11336-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:12038-1 No score

ruby3.1-rubygem-kramdown-2.4.0-1.1 on GA media

These are all security issues fixed in the ruby3.1-rubygem-kramdown-2.4.0-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12038-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:13161-1 No score

ruby3.2-rubygem-kramdown-2.4.0-1.8 on GA media

These are all security issues fixed in the ruby3.2-rubygem-kramdown-2.4.0-1.8 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:13161-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:14170-1 No score

ruby3.3-rubygem-kramdown-2.4.0-1.12 on GA media

These are all security issues fixed in the ruby3.3-rubygem-kramdown-2.4.0-1.12 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:14170-1
Updated
2026-11-02
OSVopenSUSE-SU-2025:15119-1 No score

ruby3.4-rubygem-kramdown-2.4.0-1.15 on GA media

These are all security issues fixed in the ruby3.4-rubygem-kramdown-2.4.0-1.15 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:15119-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:10352-1 No score

ruby4.0-rubygem-kramdown-2.4.0-1.17 on GA media

These are all security issues fixed in the ruby4.0-rubygem-kramdown-2.4.0-1.17 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:10352-1
Updated
2026-11-02
OSVUSN-6424-1 No score

ruby-kramdown vulnerability

It was discovered that kramdown did not restrict Rouge formatters to the correct namespace. An attacker could use this issue to cause kramdown to execute arbitrary code.

Record
USN-6424-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
kramdown
RubyGems
1.16.0 up to 2.3.1
2.3.1
ruby-kramdown
Debian:12
before 2.3.0-5
2.3.0-5
ruby-kramdown
Debian:13
before 2.3.0-5
2.3.0-5
ruby-kramdown
Debian:14
before 2.3.0-5
2.3.0-5
ruby-kramdown
Debian:10
before 1.17.0-1+deb10u2, plus listed versions
1.17.0-11.17.0-1+deb10u1
1.17.0-1+deb10u2
kramdown
RubyGems
1.16.0 up to 2.3.1, plus listed versions
1.16.11.16.21.17.02.0.02.0.0.beta1
Show 5 moreShow less
2.0.0.beta22.1.02.2.02.2.12.3.0
2.3.1
rubygem-kramdown
openEuler:20.03-LTS-SP1
before 2.1.0-2.oe1
2.1.0-2.oe1
ruby-kramdown
Ubuntu:20.04:LTS
before 1.17.0-4ubuntu0.2, plus listed versions
1.17.0-11.17.0-21.17.0-41.17.0-4ubuntu0.1
1.17.0-4ubuntu0.2
rubygem-kramdown
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 2.4.0-1.1
2.4.0-1.1
ruby3.2-rubygem-kramdown
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 2.4.0-1.8
2.4.0-1.8
rubygem-kramdown
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 2.4.0-1.12
2.4.0-1.12
rubygem-kramdown
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 2.4.0-1.15
2.4.0-1.15
rubygem-kramdown
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 2.4.0-1.17
2.4.0-1.17

History

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-28834 is a critical vulnerability (CVSS 9.8) in Kramdown Project Kramdown, published March 19, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.70%, the 85th percentile. Fixed in kramdown 2.3.1.

References

Show 17 moreShow less
MoveEnter Open