Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2022-45151

The stored-XSS vulnerability was discovered in Moodle which exists due to insufficient sanitization of user-supplied data in several "social" user profile fields. An attacker could inject and execute arbitrary HTML and script code in user's browser in context of vulnerable website.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-45151
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 11:33 UTC · Revision 1

Source evidence

CVE-2022-45151

core-osv · Original source

Published 23 Nov 2022, 00:00 UTC

The stored-XSS vulnerability was discovered in Moodle which exists due to insufficient sanitization of user-supplied data in several "social" user profile fields. An attacker could inject and execute arbitrary HTML and script code in user's browser in context of vulnerable website.

osv:CVE-2022-45151
Complete source record
{
  "id": "fadc3b931331ad6af51d3d3dedbb2d8bf7adfd80f764a549c09ba19edc28d242",
  "url": "https://osv.dev/vulnerability/CVE-2022-45151",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2022-45151",
    "summary": "The stored-XSS vulnerability was discovered in Moodle which exists due to insufficient sanitization of user-supplied data in several \"social\" user profile fields. An attacker could inject and execute arbitrary HTML and script code in user's browser in context of vulnerable website.",
    "evidence": "osv:CVE-2022-45151",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-45151",
      "aliases": [
        "BIT-moodle-2022-45151",
        "CVE-2022-45151",
        "GHSA-xv72-6pgh-cjj8"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/moodle/moodle",
              "type": "GIT",
              "events": [
                {
                  "introduced": "94f2d3fc4b974c5c7d500988c56b7ca15f58d7ec"
                },
                {
                  "fixed": "becbdd847ddac6ebaf8c9327ba523e5db95bb64c"
                },
                {
                  "introduced": "8b359ad7a63cf219110bca80552fe3d4ea2a635d"
                },
                {
                  "fixed": "fdbcfa1b153ee8b3cf863044f7b28f8b3b7a9500"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.11.0"
                      },
                      {
                        "fixed": "3.11.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.0.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.11.10",
            "v4.0.4",
            "v3.11.9",
            "v4.0.3",
            "v4.0.2",
            "v3.11.8",
            "v4.0.1",
            "v3.11.7",
            "v4.0.0",
            "v3.11.6",
            "v3.11.5",
            "v3.11.4",
            "v3.11.3",
            "v3.11.1",
            "v3.11.2",
            "v3.11.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-45151.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:34.602165521Z",
      "provider": "osv",
      "references": [
        "https://moodle.org/mod/forum/discuss.php?d=440771",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/45xxx/CVE-2022-45151.json",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2DHYIIAUXUBHMBEDYU7TYNZXEN2W2SA2/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/74SXNGA5RIWM7QNX7H3G7SYIQLP4UUGV/",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NLRJB5JNKK3VVBLV3NH3RI7COEDAXSAB/",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-45151",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2142774"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-79"
        ],
        "cna_assigner": "fedora",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "Fixed in moodle 4.0.5, moodle 3.11.11"
                  },
                  {
                    "last_affected": "Fixed in moodle 4.0.5, moodle 3.11.11"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandaloneSingleVersion"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/45xxx/CVE-2022-45151.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-45151",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 502047,
  "published_at": "2022-11-23T00:00:00+00:00"
}