CVE-2021-28834
rubygem-kramdown: allows arbitrary classes to be instantiated
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD, Ruby Advisory DB. Rated lower by GHSA (high), Red Hat (medium), Ubuntu (medium).
Description
Kramdown before 2.3.1 does not restrict Rouge formatters to the Rouge::Formatters namespace, and thus arbitrary classes can be instantiated.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| rubygems::Ruby Advisory Database | kramdown | >= 2.3.1 |
| debian 10 | ruby-kramdown | 1.17.0-1+deb10u2 |
| debian 11 | ruby-kramdown | 2.3.0-5 |
| debian 12 | ruby-kramdown | 2.3.0-5 |
| debian 13 | ruby-kramdown | 2.3.0-5 |
| debian 14 | ruby-kramdown | 2.3.0-5 |
| echo | ruby-kramdown | 2.3.0-5 |
| rubygems::GitHub Security Advisory RubyGems | kramdown | 2.3.1 |
| ubuntu 20.04 | ruby-kramdown | 1.17.0-4ubuntu0.2 |
| ubuntu 20.04-ESM | ruby-kramdown | 1.17.0-4ubuntu0.2 |
References
- 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
- https://access.redhat.com/security/cve/CVE-2021-28834
- https://github.com/advisories/GHSA-52p9-v744-mwjj
- https://github.com/gettalong/kramdown/compare/REL_2_3_0...REL_2_3_1
- https://github.com/gettalong/kramdown/pull/708
- https://github.com/stanhu/kramdown/commit/d6a1cbcb2caa2f8a70927f176070d126b2422760
- https://github.com/stanhu/kramdown/commit/ff0218aefcf00cd5a389e17e075d36cd46d011e2
- https://gitlab.com/gitlab-org/gitlab/-/commit/179329b5c3c118924fb242dc449d06b4ed6ccb66
All 18 references
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NJCJVYHPY6LNUFM6LYZIAUIYOMVT5QGV
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NJCJVYHPY6LNUFM6LYZIAUIYOMVT5QGV/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S3BBLUIDCUUR3NEE4NJLOCCAV3ALQ3O6
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S3BBLUIDCUUR3NEE4NJLOCCAV3ALQ3O6/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SYOLQKFL6IJCQLBXV34Z4TI4O54GESPR
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SYOLQKFL6IJCQLBXV34Z4TI4O54GESPR/
- https://nvd.nist.gov/vuln/detail/CVE-2021-28834
- https://ubuntu.com/security/notices/USN-6424-1
- https://www.cve.org/CVERecord?id=CVE-2021-28834
- https://www.debian.org/security/2021/dsa-4890