6.1medium
Cross site scripting in comrak
- Severity
- 6.1medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.69% (higher than 54% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-xmr7-v725-2jjrRUSTSEC-2021-0026
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| comrak (crates.io) | before 0.9.1, from 0.0.0-0 before 0.9.1 | GitHub Advisory Database, RustSec Advisory Database |
| comrak_project comrak | before 0.9.1 | NVD |
All scores
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| RustSec Advisory Database | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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.
RustSec Advisory Database
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.
NVD (es)
Se detectó un problema en la crate comrak versiones anteriores a 0.9.1 para Rust. 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
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-27671 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xmr7-v725-2jjr changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0026 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2021-27671 changed 2026-06-17 | Public domain |