CVE-2022-46147: Xblock drag and drop v2 Cross-Site Scripting Vulnerability
HIGHCVE-2022-46147 is a HIGH (CVSS 8.4) cross-site scripting vulnerability (CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)) affecting Xblock drag and drop v2 libraries in the PyPI ecosystem. The issue involves xblock vulnerable to cross-site scripting (xss). Remediation is available by upgrading affected packages to version 3.0.0.
CVE-2022-46147 at a Glance
Security Impact
CVSS: 8.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H).
How to Fix CVE-2022-46147
To remediate this vulnerability, upgrade all affected Xblock drag and drop v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install xblock-drag-and-drop-v2>=3.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show xblock-drag-and-drop-v2
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-46147, inspect your installed packages using pip:
pip show xblock-drag-and-drop-v2
Analyze the terminal output to locate any version of Xblock drag and drop v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0), your application is affected.
Note: The pip show xblock-drag-and-drop-v2 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as "<", ">", and "&" that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. In Xblock drag and drop v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-46147 Affected Xblock drag and drop v2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
xblock-drag-and-drop-v2
|
PyPI |
< 3.0.0
|
3.0.0
|
References
Frequently Asked Questions
What is CVE-2022-46147?
Which Xblock drag and drop v2 versions are affected?
What version fixes CVE-2022-46147?
Is xblock-drag-and-drop-v2 affected?
What is the CVSS score of CVE-2022-46147?
What CWE is associated with CVE-2022-46147?
How can I check PyPI dependencies for CVE-2022-46147?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qv6c-367r-3w6q",
"modified" : "2024-11-22T20:34:30Z",
"published" : "2022-12-02T22:26:22Z",
"aliases" : [ "CVE-2022-46147" ],
"summary" : "XBlock vulnerable to Cross-Site Scripting (XSS) ",
"details" : "### Impact\nXSS Vulnerability in multiple XBlock Fields. Any platform that has deployed the XBlock will be impacted.\n\n### Patches\nhttps://github.com/openedx/xblock-drag-and-drop-v2/commit/53c4482f9bb6d8c7ccdf5253bd82c84a222b2492\n\nThe fix is compatible with all Open edX releases newer than Lilac.\n\n### Workarounds\nNone.\n\n### References\nhttps://github.com/openedx/xblock-drag-and-drop-v2/pull/295#issuecomment-1277693864\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "xblock-drag-and-drop-v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/openedx/xblock-drag-and-drop-v2/security/advisories/GHSA-qv6c-367r-3w6q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-46147"
}, {
"type" : "WEB",
"url" : "https://github.com/openedx/xblock-drag-and-drop-v2/pull/295#issuecomment-1277693864"
}, {
"type" : "WEB",
"url" : "https://github.com/openedx/xblock-drag-and-drop-v2/commit/53c4482f9bb6d8c7ccdf5253bd82c84a222b2492"
}, {
"type" : "WEB",
"url" : "https://github.com/openedx/xblock-drag-and-drop-v2/commit/68887d1b4a44325d2de7573d450e41129ba98b1a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/openedx/xblock-drag-and-drop-v2"
}, {
"type" : "WEB",
"url" : "https://github.com/openedx/xblock-drag-and-drop-v2/releases/tag/v3.0.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/xblock-drag-and-drop-v2/PYSEC-2022-43175.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79", "CWE-80" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-02T22:26:22Z",
"nvd_published_at" : "2022-11-28T21:15:00Z"
}
}