{"id":"CVE-2021-38186","aliases":["EUVD-2021-1606","GHSA-6wj2-g87r-pm62","RUSTSEC-2021-0063"],"status":"published","title":"Cross-site Scripting in comrak","description":"An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles \u0026 characters, leading to XSS via \u0026# HTML entities.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.00741,"percentile":0.55098,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2021-05-04T12:00:00Z","modified":"2026-10-24T10:31:00Z","fixes":[{"ecosystem":"crates.io","package":"comrak","fixed_in":["0.10.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"comrak","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.10.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"comrak","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.10.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"comrak","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.10.1"}]}]}],"products":[{"vendor":"comrak_project","product":"comrak"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0063.html","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","fix","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/comrak/RUSTSEC-2021-0063.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-38186","tags":["advisory"]},{"url":"https://github.com/kivikakk/comrak/releases/tag/0.10.1","tags":["web"]},{"url":"https://github.com/kivikakk/comrak/commit/b72340cabe4749952530b4fb6b4fcc706bc973e5","tags":["web"]},{"url":"https://github.com/kivikakk/comrak/compare/0.10.0...0.10.1","tags":["web"]},{"url":"https://github.com/advisories/GHSA-6wj2-g87r-pm62"},{"url":"https://github.com/kivikakk/comrak","tags":["package"]},{"url":"https://crates.io/crates/comrak","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-38186","description":"An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles \u0026 characters, leading to XSS via \u0026# HTML entities.","status":"published","published":"2021-08-08T05:10:53Z","modified":"2024-08-04T01:37:15.492Z","updated_at":"2026-11-02T14:33:07.349244Z"}],"euvd":[{"id":"EUVD-2021-1606","description":"An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles \u0026 characters, leading to XSS via \u0026# HTML entities.","status":"published","published":"2021-08-08T05:10:53Z","modified":"2024-08-04T01:37:15Z","updated_at":"2026-11-03T03:24:25.678078Z"}],"ghsa":[{"id":"GHSA-6wj2-g87r-pm62","title":"Cross-site Scripting in comrak","description":"An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles \u0026 characters, leading to XSS via \u0026# HTML entities.","status":"published","published":"2021-08-25T20:55:43Z","modified":"2023-03-30T23:14:14Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:48.905887Z"}],"nvd":[{"id":"CVE-2021-38186","description":"An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles \u0026 characters, leading to XSS via \u0026# HTML entities.","status":"published","published":"2021-08-08T06:15:08.78Z","modified":"2026-06-17T04:01:43.127Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:06:56.562207Z"}],"osv":[{"id":"CVE-2021-38186","description":"An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles \u0026 characters, leading to XSS via \u0026# HTML entities.","status":"published","published":"2021-08-08T06:15:08.78Z","modified":"2026-10-24T10:31:00.261358228Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:20.843843Z"},{"id":"GHSA-6wj2-g87r-pm62","title":"Cross-site Scripting in comrak","description":"An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles \u0026 characters, leading to XSS via \u0026# HTML entities.","status":"published","published":"2021-08-25T20:55:43Z","modified":"2023-11-08T04:06:25.615713Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:40.308826Z"},{"id":"RUSTSEC-2021-0063","title":"XSS in `comrak`","description":"[comrak](https://github.com/kivikakk/comrak) operates by default in a \"safe\"\nmode of operation where unsafe content, such as arbitrary raw HTML or URLs with\nnon-standard schemes, are not permitted in the output.  This is per the\nreference GFM implementation, [cmark-gfm](https://github.com/github/cmark).\n\nAmpersands were not being correctly escaped in link targets, making it possible\nto fashion unsafe URLs using schemes like `data:` or `javascript:` by entering\nthem as HTML entities, e.g. `\u0026#x64\u0026#x61\u0026#x74\u0026#x61\u0026#x3a`.  The intended\nbehaviour, demonstrated upstream, is that these should be escaped and therefore\nharmless, but this behaviour was broken in comrak.","status":"published","published":"2021-05-04T12:00:00Z","modified":"2023-11-08T04:06:25.615713Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
