Advisory

RUSTSEC-2021-0063

Also known as: CVE-2021-38186, GHSA-6wj2-g87r-pm62

Summary

XSS in comrak

Details

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.

Severity

Not rated by the source.

Dates

Published
2021-05-04 12:00 UTC
Modified
2023-11-08 04:06 UTC

Affected packages and fixes

comrak

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.10.1 (semver)

Fixed versions

0.10.1

Fix

  • Fixed version 0.10.1
    cargo update -p comrak --precise 0.10.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences