{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:nim-lang:nim:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.6.2"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "9084d9bc02bcd983b81a4c76a05f27b9ce2707dd"
            },
            {
              "fixed": "46275126b89218e64844eee169e8ced05dd0e2d7"
            }
          ],
          "repo": "https://github.com/nim-lang/nim",
          "type": "GIT"
        }
      ]
    },
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:nim-lang:nimforum:*:*:*:*:*:nim:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2.2.0"
              }
            ],
            "source": "CPE_RANGE"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "26a3bb993c186d5a5c4c2464aa2c13a0cba9ef4c"
            }
          ],
          "repo": "https://github.com/nim-lang/nimforum",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {},
  "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.)",
  "id": "CVE-2021-46872",
  "modified": "2026-07-08T05:37:51.583140962Z",
  "published": "2023-01-13T06:15:10.940Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/nim-lang/Nim/compare/v1.6.0...v1.6.2"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/nim-lang/nimforum"
    },
    {
      "type": "REPORT",
      "url": "https://forum.nim-lang.org/t/8852"
    },
    {
      "type": "FIX",
      "url": "https://github.com/nim-lang/Nim/commit/46275126b89218e64844eee169e8ced05dd0e2d7"
    },
    {
      "type": "FIX",
      "url": "https://github.com/nim-lang/Nim/pull/19134"
    }
  ],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}