# CVE-2021-38186: Cross-site Scripting in comrak

- Severity: Medium 6.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- 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): 0.74%, higher than 55% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-05-04T12:00:00.000Z
- Modified: 2026-06-17T04:01:43.127Z
- Also known as: GHSA-6wj2-g87r-pm62, RUSTSEC-2021-0063
- Weaknesses: CWE-79
- Assigned by: mitre

## Description

An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles & characters, leading to XSS via &# HTML entities.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- comrak (crates.io): before 0.10.1; from 0.0.0-0 before 0.10.1
- comrak_project comrak: before 0.10.1

## Every score

- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://rustsec.org/advisories/RUSTSEC-2021-0063.html> (exploit, advisory, issue-tracking, patch, third-party-advisory, web)
- <https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/comrak/RUSTSEC-2021-0063.md> (third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-38186> (advisory)
- <https://github.com/kivikakk/comrak/commit/b72340cabe4749952530b4fb6b4fcc706bc973e5> (web)
- <https://github.com/kivikakk/comrak> (package)
- <https://github.com/kivikakk/comrak/compare/0.10.0...0.10.1> (web)
- <https://github.com/kivikakk/comrak/releases/tag/0.10.1> (web)
- <https://crates.io/crates/comrak> (package)

## Sources

- CVE List: [CVE-2021-38186](https://www.cve.org/CVERecord?id=CVE-2021-38186), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-6wj2-g87r-pm62](https://github.com/advisories/GHSA-6wj2-g87r-pm62), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2021-0063](https://rustsec.org/advisories/RUSTSEC-2021-0063.html), CC0-1.0, modified 2023-11-08
- NVD: [CVE-2021-38186](https://nvd.nist.gov/vuln/detail/CVE-2021-38186), Public domain, modified 2026-06-17

---

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