Vulnerability MediumRUSTSEC-2021-0026 · comrak
RUSTSEC-2021-0026: XSS in `comrak`
Short answerA security vulnerability in the comrak crate: XSS in `comrak`. Medium severity (CVSS 6.1). Fixed in 0.9.1: update to a fixed version.
| Crate | comrak |
|---|---|
| Type | Vulnerability (format-injection) |
| Affected versions | Before 0.9.1. |
| Fixed in | 0.9.1 |
| Severity | Medium, CVSS 6.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| Published | 2021-02-21 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2021-27671, GHSA-xmr7-v725-2jjr |
What to do
- See which version you have:
cargo tree -i comrak(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p comrak. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplecomrak = "0.9.1") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
The comrak we were matching unsafe URL prefixes, such as data: or javascript: , in a case-sensitive manner. This meant prefixes like Data: were untouched.
References
- Package: crates.io/crates/comrak
- Advisory: rustsec.org/advisories/RUSTSEC-2021-0026.html
- Web: github.com/kivikakk/comrak/releases/tag/0.9.1
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for comrak
- VulnerabilityRUSTSEC-2021-0063 · 2021-05-04XSS in `comrak`
- VulnerabilityGHSA-5r3x-p7xx-x6q5 · 2023-03-28Comrak AST node data is not validated (GHSL-2023-049)
- VulnerabilityGHSA-8hqf-xjwp-p67v · 2023-03-28Comrak vulnerable to quadratic runtime issues when parsing Markdown (GHSL-2023-047)
- VulnerabilityGHSA-xxmq-4vph-956w · 2023-03-28Comrak vulnerable to production of excessive output when parsing Markdown (GHSL-2023-048)
Up next
Same cratecomrak: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?