{
  "affected": [
    {
      "database_specific": {
        "unresolved_ranges": [
          {
            "events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2022-11-30"
              }
            ]
          }
        ]
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "91478f5cfecdcc43cf85b997168a8ecfd0f8df90"
            }
          ],
          "repo": "https://github.com/discourse/discourse-bbcode",
          "type": "GIT"
        },
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "91478f5cfecdcc43cf85b997168a8ecfd0f8df90"
            }
          ],
          "repo": "https://github.com/discourse/discourse-bbcode",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-8c87-xpqv-c7mp"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-74"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/46xxx/CVE-2022-46162.json"
  },
  "details": "discourse-bbcode is the official BBCode plugin for Discourse. Prior to commit 91478f5, CSS injection can occur when rendering content generated with the discourse-bccode plugin. This vulnerability only affects sites which have the discourse-bbcode plugin installed and enabled. This issue is patched in commit 91478f5. As a workaround, ensure that the Content Security Policy is enabled and monitor any posts that contain bbcode.",
  "id": "CVE-2022-46162",
  "modified": "2026-04-01T23:09:35.107972463Z",
  "published": "2022-11-30T00:00:00Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/46xxx/CVE-2022-46162.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/discourse/discourse-bbcode/security/advisories/GHSA-8c87-xpqv-c7mp"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-46162"
    },
    {
      "type": "FIX",
      "url": "https://github.com/discourse/discourse-bbcode/commit/91478f5cfecdcc43cf85b997168a8ecfd0f8df90"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Discourse BBCode plugin vulnerable to arbitrary CSS injection"
}