{"id":"UBUNTU-CVE-2021-46872","details":"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.)","modified":"2026-05-20T16:05:26.127238964Z","published":"2023-01-13T06:15:00Z","upstream":["CVE-2021-46872"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2021-46872"},{"type":"REPORT","url":"https://forum.nim-lang.org/t/8852"},{"type":"REPORT","url":"https://github.com/nim-lang/Nim/pull/19134"},{"type":"REPORT","url":"https://github.com/nim-lang/Nim/compare/v1.6.0...v1.6.2"},{"type":"REPORT","url":"https://github.com/nim-lang/nimforum"},{"type":"REPORT","url":"https://github.com/nim-lang/Nim/commit/46275126b89218e64844eee169e8ced05dd0e2d7"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2021-46872"}],"affected":[{"package":{"name":"nim","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/nim?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.11.2+dfsg1-4","0.12.0-2"],"ecosystem_specific":{"binaries":[{"binary_name":"nim","binary_version":"0.12.0-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-46872.json"}},{"package":{"name":"nim","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/nim?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.17.2-1ubuntu1","0.17.2-1ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_name":"nim","binary_version":"0.17.2-1ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-46872.json"}},{"package":{"name":"nim","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/nim?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.20.2-1","1.0.2-1","1.0.3~rc-1","1.0.4-1","1.0.6-1"],"ecosystem_specific":{"binaries":[{"binary_name":"nim","binary_version":"1.0.6-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-46872.json"}},{"package":{"name":"nim","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/nim?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.6.14-1","1.6.14-1ubuntu1","1.6.14-1ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_name":"nim","binary_version":"1.6.14-1ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-46872.json"}},{"package":{"name":"nim","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/nim?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.6.14-1ubuntu2","2.2.4-1"],"ecosystem_specific":{"binaries":[{"binary_name":"nim","binary_version":"2.2.4-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-46872.json"}},{"package":{"name":"nim","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/nim?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.4-1","2.2.4-2"],"ecosystem_specific":{"binaries":[{"binary_version":"2.2.4-2","binary_name":"nim"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-46872.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"type":"Ubuntu","score":"medium"}]}