GHSA-pgjv-jrg2-gq3v: Dompurify Cross-Site Scripting Vulnerability
MODERATEGHSA-pgjv-jrg2-gq3v is a MODERATE cross-site scripting vulnerability (General Security Weakness) affecting Dompurify libraries in the PyPI ecosystem. The issue involves dompurify vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 2.2.2.
GHSA-pgjv-jrg2-gq3v at a Glance
How to Fix GHSA-pgjv-jrg2-gq3v
To remediate this vulnerability, upgrade all affected Dompurify 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 dompurify>=2.2.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show dompurify
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-pgjv-jrg2-gq3v, inspect your installed packages using pip:
pip show dompurify
Analyze the terminal output to locate any version of Dompurify in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.2), your application is affected.
Note: The pip show dompurify command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Dompurify, 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
GHSA-pgjv-jrg2-gq3v Affected Dompurify Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
dompurify
|
PyPI |
< 2.2.2
|
2.2.2
|
References
Frequently Asked Questions
What is GHSA-pgjv-jrg2-gq3v?
Which Dompurify versions are affected?
What version fixes GHSA-pgjv-jrg2-gq3v?
Is dompurify affected?
What CWE is associated with GHSA-pgjv-jrg2-gq3v?
How can I check PyPI dependencies for GHSA-pgjv-jrg2-gq3v?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pgjv-jrg2-gq3v",
"modified" : "2023-01-11T23:47:05Z",
"published" : "2023-01-11T23:47:05Z",
"aliases" : [ ],
"summary" : "dompurify vulnerable to Cross-site Scripting",
"details" : "dompurify prior to version 2.2.2 is vulnerable to cross-site scripting when converting from SVG namespace.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "dompurify"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cure53/DOMPurify/issues/482"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cure53/DOMPurify"
}, {
"type" : "WEB",
"url" : "https://github.com/cure53/DOMPurify/releases/tag/2.2.2"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-DOMPURIFY-1035544"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-11T23:47:05Z",
"nvd_published_at" : null
}
}