{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "versions": [
              {
                "introduced": "0"
              },
              {
                "fixed": "2026.3.0-latest.1"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "d02b29668fc9c5647c0b1e2cefed2967e7647838"
            }
          ],
          "repo": "https://github.com/discourse/discourse",
          "type": "GIT"
        },
        {
          "database_specific": {
            "versions": [
              {
                "introduced": "2026.2.0-latest"
              },
              {
                "fixed": "2026.2.1"
              }
            ]
          },
          "events": [
            {
              "introduced": "f7cec86997edc21d6074ceb7666f7e2e6e1b1fdf"
            },
            {
              "fixed": "f38464e46df1b8c51f7d60826502476908d6bb2b"
            }
          ],
          "repo": "https://github.com/discourse/discourse",
          "type": "GIT"
        },
        {
          "database_specific": {
            "versions": [
              {
                "introduced": "2026.1.0-latest"
              },
              {
                "fixed": "2026.1.2"
              }
            ]
          },
          "events": [
            {
              "introduced": "322d3c0ac6a8f133b3f82875e9dbbe310f638c1b"
            },
            {
              "fixed": "808b2ac23d8ff421563b40203091026732471c60"
            }
          ],
          "repo": "https://github.com/discourse/discourse",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-h653-cq78-vjj2"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-80"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27166.json"
  },
  "details": "Discourse is an open source discussion platform. Prior to versions 2026.3.0-latest.1, 2026.2.1 and  2026.1.2, insufficient cleanup in the default Codepen allowed iframes value allows an attacker to trick a user into changing the URL of the main page. This issue has been fixed in versions 2026.3.0-latest.1, 2026.2.1 and  2026.1.2. To workaround this issue, remove Codepen from the list of allowed iframes.",
  "id": "CVE-2026-27166",
  "modified": "2026-04-01T23:09:17.649245211Z",
  "published": "2026-03-19T20:29:22.570Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27166.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/discourse/discourse/security/advisories/GHSA-h653-cq78-vjj2"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27166"
    },
    {
      "type": "FIX",
      "url": "https://github.com/discourse/discourse/commit/c4762a4fac2f61f52f325396b11d3aeb955ea925"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Discourse vulnerable to HTML injection via prohibited iframe URLs"
}