CVE-2021-46872
CVE-2021-46872 is a medium-severity vulnerability in Nim-lang Nim with a CVSS 3.x base score of 6.1. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-79.
Key facts
- Severity: Medium (CVSS 3.x base score 6.1)
- EPSS exploit prediction: 1% (41st percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-79
- Affected product: Nim-lang Nim
- Published:
- Last modified:
Description
An issue was discovered in Nim before 1.6.2. The RST module of the Nim language stdlib, as used in NimForum and other products, permits the javascript: URI scheme and thus can lead to XSS in some applications. (Nim versions 1.6.2 and later are fixed; there may be backports of the fix to some earlier versions. NimForum 2.2.0 is fixed.)
Frequently asked questions
- What is CVE-2021-46872?
- An issue was discovered in Nim before 1.6.2. The RST module of the Nim language stdlib, as used in NimForum and other products, permits the javascript: URI scheme and thus can lead to XSS in some applications. (Nim versions 1.6.2 and later are fixed; there may be backports of the fix to some earlier versions. NimForum 2.2.0 is fixed.)
- How severe is CVE-2021-46872?
- CVE-2021-46872 has a CVSS 3.x base score of 6.1, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is low, integrity low, and availability none.
- Is CVE-2021-46872 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (41st percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-46872?
- CVE-2021-46872 primarily affects Nim-lang Nim. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2021-46872?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-46872 published?
- CVE-2021-46872 was published on 2023-01-13 and last updated on 2026-06-17.
References
- https://forum.nim-lang.org/t/8852
- https://github.com/nim-lang/Nim/commit/46275126b89218e64844eee169e8ced05dd0e2d7
- https://github.com/nim-lang/Nim/compare/v1.6.0...v1.6.2
- https://github.com/nim-lang/Nim/pull/19134
- https://github.com/nim-lang/nimforum
Affected products (2)
- cpe:2.3:a:nim-lang:nim:*:*:*:*:*:*:*:*
- cpe:2.3:a:nim-lang:nimforum:*:*:*:*:*:nim:*:*
More vulnerabilities in Nim-lang Nim
- CVE-2020-15690 — Critical (CVSS 9.8): In Nim before 1.2.6, the standard library asyncftpclient lacks a check for whether a message contains a newline…
- CVE-2020-15692 — Critical (CVSS 9.8): In Nim 1.2.4, the standard library browsers mishandles the URL argument to browsers.openDefaultBrowser. This argument…
- CVE-2021-21372 — High (CVSS 8.3): Nimble is a package manager for the Nim programming language. In Nim release version before versions 1.2.10 and 1.4.4,…
- CVE-2021-21374 — High (CVSS 8.1): Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4,…
- CVE-2021-21373 — High (CVSS 7.5): Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4,…
- CVE-2020-15694 — High (CVSS 7.5): In Nim 1.2.4, the standard library httpClient fails to properly validate the server response. For example,…
All CVEs affecting Nim-lang Nim →
Other CWE-79 (Cross-site Scripting (XSS)) vulnerabilities
- CVE-2025-49410 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Imran Emu TC…
- CVE-2024-47875 — Critical (CVSS 10.0): DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMpurify was vulnerable to…
- CVE-2024-6886 — Critical (CVSS 10.0): Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea…
- CVE-2023-45144 — Critical (CVSS 10.0): com.xwiki.identity-oauth:identity-oauth-ui is a package to aid in building identity and service providers based on…
- CVE-2023-45138 — Critical (CVSS 10.0): Change Request is an pplication allowing users to request changes on a wiki without publishing the changes directly.…
- CVE-2022-4361 — Critical (CVSS 10.0): Keycloak, an open-source identity and access management solution, has a cross-site scripting (XSS) vulnerability in the…
Browse all CWE-79 (Cross-site Scripting (XSS)) vulnerabilities →