{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "4.5.13"
              },
              {
                "introduced": "5.0.0"
              },
              {
                "fixed": "5.0.9"
              },
              {
                "introduced": "5.1.0"
              },
              {
                "fixed": "5.1.6"
              },
              {
                "introduced": "5.2.0"
              },
              {
                "fixed": "5.2.2"
              }
            ],
            "source": "CPE_RANGE"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8cbae18a2898cfd8266ec91ac206e12004f0ff5f"
            },
            {
              "introduced": "78e860178314c45441a21e0b99455400b8283d48"
            },
            {
              "fixed": "152bf2ebbdd1f994331af21c80332b8d9051581c"
            },
            {
              "introduced": "eb47eff0719455a7e1f7a9805bc75dad3f6b3995"
            },
            {
              "fixed": "17513f6614237b530de7903fe32117fa026384c2"
            },
            {
              "introduced": "c197f31fd89bf5dd5ba41661b06660167e419099"
            },
            {
              "fixed": "acfa383c13dd46c83ca82894a8e95fac273fda33"
            }
          ],
          "repo": "https://github.com/moodle/moodle",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "fedora",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102581.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "introduced": "5.2.0"
          },
          {
            "fixed": "5.2.2"
          },
          {
            "introduced": "5.1.0"
          },
          {
            "fixed": "5.1.6"
          },
          {
            "introduced": "5.0.0"
          },
          {
            "fixed": "5.0.9"
          },
          {
            "fixed": "4.5.13"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "A flaw was found in Moodle. Insufficient output escaping in templates used to display forum posts enables a stored cross-site scripting (XSS) vulnerability. An attacker can inject malicious content into a forum post, which then executes arbitrary script code in the browser of another user viewing the affected post.",
  "id": "CVE-2026-102581",
  "modified": "2026-10-03T03:30:55.845182205Z",
  "published": "2026-09-30T08:36:08.405Z",
  "references": [
    {
      "type": "WEB",
      "url": "http://git.moodle.org/gw?p=moodle.git\u0026a=search\u0026h=HEAD\u0026st=commit\u0026s=MDL-88981"
    },
    {
      "type": "WEB",
      "url": "https://git.moodle.org"
    },
    {
      "type": "WEB",
      "url": "https://moodle.org/mod/forum/discuss.php?d=482499"
    },
    {
      "type": "ADVISORY",
      "url": "https://access.redhat.com/security/cve/CVE-2026-102581"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102581.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-102581"
    },
    {
      "type": "REPORT",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2543634"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Moodle: xss in forum post templates due to insufficient escaping"
}