# CVE-2021-28834: Remote code execution in Kramdown

- Severity: Critical 9.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.70%, higher than 87% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-03-19T06:51:15.000Z
- Modified: 2026-06-17T03:46:57.807Z
- Also known as: GHSA-52p9-v744-mwjj
- Weaknesses: CWE-94
- Assigned by: mitre

## Description

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

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- kramdown (RubyGems): from 1.16.0 before 2.3.1
- kramdown_project kramdown: before 2.3.1
- fedoraproject fedora: 32; 33; 34
- debian debian_linux: 10.0

## Every score

- GitHub: CVSS:3.1 9.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/gettalong/kramdown/pull/708> (exploit, third-party-advisory, web)
- <https://gitlab.com/gitlab-org/gitlab/-/commit/179329b5c3c118924fb242dc449d06b4ed6ccb66> (patch, third-party-advisory, web)
- <https://github.com/gettalong/kramdown/compare/REL_2_3_0...REL_2_3_1> (patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S3BBLUIDCUUR3NEE4NJLOCCAV3ALQ3O6/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SYOLQKFL6IJCQLBXV34Z4TI4O54GESPR/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NJCJVYHPY6LNUFM6LYZIAUIYOMVT5QGV/> (vendor-advisory)
- <https://www.debian.org/security/2021/dsa-4890> (third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-28834> (advisory)
- <https://github.com/stanhu/kramdown/commit/d6a1cbcb2caa2f8a70927f176070d126b2422760> (web)
- <https://github.com/stanhu/kramdown/commit/ff0218aefcf00cd5a389e17e075d36cd46d011e2> (web)
- <https://about.gitlab.com/releases/2021/03/17/security-release-gitlab-13-9-4-released/#remote-code-execution-via-unsafe-user-controlled-markdown-rendering-options> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NJCJVYHPY6LNUFM6LYZIAUIYOMVT5QGV> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S3BBLUIDCUUR3NEE4NJLOCCAV3ALQ3O6> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SYOLQKFL6IJCQLBXV34Z4TI4O54GESPR> (web)

## Sources

- CVE List: [CVE-2021-28834](https://www.cve.org/CVERecord?id=CVE-2021-28834), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-52p9-v744-mwjj](https://github.com/advisories/GHSA-52p9-v744-mwjj), CC-BY-4.0, modified 2024-02-17
- NVD: [CVE-2021-28834](https://nvd.nist.gov/vuln/detail/CVE-2021-28834), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-28834 · Whole record: https://cve.day/CVE-2021-28834.json · Rebuilt by cve.day 2026-11-25T22:58:00.344Z
