Email me

Rust advisories / comrak

Vulnerability MediumRUSTSEC-2021-0063 · comrak

RUSTSEC-2021-0063: XSS in `comrak`

Short answerA security vulnerability in the comrak crate: XSS in `comrak`. GitHub rates it Medium. Fixed in 0.10.1: update to a fixed version.

Cratecomrak
TypeVulnerability (format-injection)
Affected versionsBefore 0.10.1.
Fixed in0.10.1
SeverityMedium (GitHub rating)
Published2021-05-04
Last changed2023-11-08
Also known asCVE-2021-38186, GHSA-6wj2-g87r-pm62

What to do

  1. See which version you have: cargo tree -i comrak (it also shows which of your dependencies pulls it in).
  2. 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 example comrak = "0.10.1") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

comrak operates by default in a "safe" mode of operation where unsafe content, such as arbitrary raw HTML or URLs with non-standard schemes, are not permitted in the output. This is per the reference GFM implementation, cmark-gfm.

Ampersands were not being correctly escaped in link targets, making it possible to fashion unsafe URLs using schemes like data: or javascript: by entering them as HTML entities, e.g. &#x64&#x61&#x74&#x61&#x3a. The intended behaviour, demonstrated upstream, is that these should be escaped and therefore harmless, but this behaviour was broken in comrak.

References

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

Full security history of comrak

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?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ