Skip to content

kiwitcms vulnerable to stored cross-site scripting via unrestricted file upload

High severity GitHub Reviewed Published Jun 6, 2023 in kiwitcms/Kiwi • Updated Nov 11, 2023

Package

pip kiwitcms (pip)

Affected versions

<= 12.3

Patched versions

12.4

Description

Impact

Kiwi TCMS allows users to upload attachments to test plans, test cases, etc. Earlier versions of Kiwi TCMS had introduced upload validators in order to prevent potentially dangerous files from being uploaded and Content-Security-Policy definition to prevent cross-site-scripting attacks.

The upload validation checks were not 100% robust which left the possibility to circumvent them and upload a potentially dangerous file which allows execution of arbitrary JavaScript in the browser. Additionally we've discovered that Nginx's proxy_pass directive will strip some headers negating protections built into Kiwi TCMS when served behind a reverse proxy.

Patches

  • Improved file upload validation code
  • Updated Nginx reverse proxy configuration for *.tenant.kiwitcms.org

Workarounds

If serving Kiwi TCMS behind a reverse proxy make sure that additional header values are still passed to the client browser. If they aren't redefine them inside the proxy configuration. See etc/nginx.conf#L66-L68 and etc/nginx.conf#L87

References

Disclosed by M Nadeem Qazi.

References

@atodorov atodorov published to kiwitcms/Kiwi Jun 6, 2023
Published to the GitHub Advisory Database Jun 6, 2023
Reviewed Jun 6, 2023
Published by the National Vulnerability Database Jun 6, 2023
Last updated Nov 11, 2023

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
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
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:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

EPSS score

0.110%
(45th percentile)

CVE ID

CVE-2023-33977

GHSA ID

GHSA-2fqm-m4r2-fh98

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.