Skip to content

Cross Site Scripting vulnerability in wsgidav when directory browsing is enabled

High
mar10 published GHSA-xx6g-jj35-pxjv Nov 11, 2022

Package

pip wsgidav (pip)

Affected versions

>=3.0.0a1,<4.1.0

Patched versions

4.1.0

Description

Impact

Implementations using this library with directory browsing enabled may be susceptible to Cross Site Scripting (XSS) attacks.

Patches

Users can upgrade to v4.1.0

Workarounds

Set dir_browser.enable = False in the configuration. For instance, when using a Python dictionary to configure the library:

config = {
    # your normal configuration
    "dir_browser": {
      "enable": False
    },
}
app = WsgiDAVApp(config)

For more information

Note that an attacker cannot exploit this vulnerability, by simply uploading a file or folder with a manipulated file name.
However 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.

If you have any questions or comments about this advisory:

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

CVE ID

CVE-2022-41905

Weaknesses

Credits