Skip to content

Misconfigured HTTP headers allowing stored XSS execution

High
atodorov published GHSA-jpgw-2r9m-8qfw Jul 4, 2023

Package

pip kiwitcms (pip)

Affected versions

<=12.4

Patched versions

12.5
kiwitcms/Kiwi (Docker Hub)
<=12.4
12.5

Description

Impact

Kiwi TCMS allows users to upload attachments to test plans, test cases, etc. Earlier versions of Kiwi TCMS had introduced
changes which were meant to serve all uploaded files as plain text in order to prevent browsers from executing potentially dangerous files when such files are accessed directly!

The previous Nginx configuration was incorrect allowing certain browsers like Firefox to ignore the Content-Type: text/plain header on some occasions thus allowing potentially dangerous scripts to be executed.

Additionally file upload validators and parts of the HTML rendering code have been found to require additional sanitation and improvements.

Patches

  • Updated Nginx content type configuration
  • Improved file upload validation code to prevent more potentially dangerous uploads
  • Sanitization of test plan names used in the tree_view_html() function

References

Disclosed by M Nadeem Qazi and
Mahshooq Zubair.

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

CVE ID

CVE-2023-36809

Credits