CVE-2022-41905: Wsgidav Cross Site Scripting Vulnerability Vulnerability
HIGHCVE-2022-41905 is a HIGH (CVSS 8.2) cross site scripting vulnerability vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Wsgidav libraries in the PyPI ecosystem. The issue involves cross site scripting vulnerability in wsgidav when directory browsing is enabled. Remediation is available by upgrading affected packages to version 4.1.0.
CVE-2022-41905 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2022-41905
To remediate this vulnerability, upgrade all affected Wsgidav 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 wsgidav>=4.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show wsgidav
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2022-41905, inspect your installed packages using pip:
pip show wsgidav
Analyze the terminal output to locate any version of Wsgidav in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.0), your application is affected.
Note: The pip show wsgidav command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Wsgidav, 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-41905 Affected Wsgidav Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wsgidav
|
PyPI |
≥ 3.0.0a1
< 4.1.0
|
4.1.0
|
References
Frequently Asked Questions
What is CVE-2022-41905?
Which Wsgidav versions are affected?
What version fixes CVE-2022-41905?
Is wsgidav affected?
What is the CVSS score of CVE-2022-41905?
What CWE is associated with CVE-2022-41905?
How can I check PyPI dependencies for CVE-2022-41905?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xx6g-jj35-pxjv",
"modified" : "2024-11-19T19:03:47Z",
"published" : "2022-11-16T00:02:05Z",
"aliases" : [ "CVE-2022-41905" ],
"summary" : "Cross Site Scripting vulnerability in wsgidav when directory browsing is enabled",
"details" : "### Impact\nImplementations using this library with directory browsing enabled may be susceptible to [Cross Site Scripting (XSS)](https://owasp.org/www-community/attacks/xss/) attacks.\n\n### Patches\nUsers can upgrade to v4.1.0\n\n### Workarounds\nSet `dir_browser.enable = False` in the configuration. For instance, when using a Python dictionary to configure the library:\n\n```\nconfig = {\n # your normal configuration\n \"dir_browser\": {\n \"enable\": False\n },\n}\napp = WsgiDAVApp(config)\n```\n\n### For more information\n\nNote that an attacker cannot exploit this vulnerability, by simply uploading a file or folder with a manipulated file name.\nHowever if the WsgiDAV library is used in a scenario where untrusted data is displayed in the directory browser's user interface (e.g. 'realm' or user name, ...) XSS may happen.\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [mar10/wsgidav](https://github.com/mar10/wsgidav/)\n* See the [security policy](https://github.com/mar10/wsgidav/security/policy)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "wsgidav"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0a1"
}, {
"fixed" : "4.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mar10/wsgidav/security/advisories/GHSA-xx6g-jj35-pxjv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41905"
}, {
"type" : "WEB",
"url" : "https://github.com/mar10/wsgidav/commit/e9606ab0f42f4c1a6611bc3c52de299b0aba7726"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mar10/wsgidav"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/wsgidav/PYSEC-2022-43018.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-16T00:02:05Z",
"nvd_published_at" : "2022-11-11T21:15:00Z"
}
}