{"id":"CVE-2021-27671","aliases":["CVE-2021-27671","GHSA-xmr7-v725-2jjr","RUSTSEC-2021-0026"],"related":[],"kind":"vulnerability","state":"published","title":"Cross site scripting in comrak","summary":"An issue was discovered in the comrak crate before 0.9.1 for Rust. XSS can occur because the protection mechanism for data: and javascript: URIs is case-sensitive, allowing (for example) Data: to be used in an attack.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue was discovered in the comrak crate before 0.9.1 for Rust. XSS can occur because the protection mechanism for data: and javascript: URIs is case-sensitive, allowing (for example) Data: to be used in an attack.","source":"cvelist"},{"lang":"en","text":"An issue was discovered in the comrak crate before 0.9.1 for Rust. Cross site scripting (XSS) can occur because the protection mechanism for data: and javascript: URIs is case-sensitive, allowing (for example) Data: to be used in an attack.","format":"markdown","source":"ghsa"},{"lang":"en","text":"The [comrak](https://github.com/kivikakk/comrak) we were matching unsafe URL prefixes, such as `data:` or `javascript:` , in a case-sensitive manner. This meant prefixes like `Data:` were untouched.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate comrak versiones anteriores a 0.9.1 para Rust.&#xa0;Un XSS puede ocurrir porque el mecanismo de protección de los URI data: y javascript: distingue entre mayúsculas y minúsculas, lo que permite (por ejemplo) que Data: sea usado en un ataque","source":"nvd"}],"published":"2021-02-21T12:00:00.000Z","modified":"2026-06-17T03:45:19.750Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.1"}],"ecosystem":"crates.io","package":"comrak","purl":"pkg:cargo/comrak","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.9.1"}],"ecosystem":"crates.io","package":"comrak","purl":"pkg:cargo/comrak","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.9.1"}],"vendor":"comrak_project","product":"comrak","cpe":"cpe:2.3:a:comrak_project:comrak:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0026.html","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27671","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/kivikakk/comrak/commit/b3efbb6e427bcd33bb14db45753ad4fd98e0f5bf","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/kivikakk/comrak","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/kivikakk/comrak/releases/tag/0.9.1","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/comrak","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-27671","url":"https://www.cve.org/CVERecord?id=CVE-2021-27671","licence":"CVE Terms of Use","modified":"2024-08-03T21:26:10.659Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xmr7-v725-2jjr","url":"https://github.com/advisories/GHSA-xmr7-v725-2jjr","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:25.341Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0026","url":"https://rustsec.org/advisories/RUSTSEC-2021-0026.html","licence":"CC0-1.0","modified":"2023-11-08T04:05:25.341Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-27671","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27671","licence":"Public domain","modified":"2026-06-17T03:45:19.750Z"}],"updatedAt":"2026-11-25T22:58:00.043Z","epss":{"score":0.00695,"percentile":0.5422,"date":"2026-12-01T12:00:22.000Z"}}