Headline
CVE-2023-33977: Improve upload validation to check for dangerous attributes · kiwitcms/Kiwi@d789f4b
Kiwi TCMS is an open source test management system for both manual and automated testing. 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. This issue has been addressed in version 12.4. Users are advised to upgrade. Users unable to upgrade who are serving Kiwi TCMS behind a reverse proxy should make sure that additional header values are still passed to the client browser. If they aren’t redefining them inside the proxy configuration.
Expand Up @@ -25,6 +25,19 @@ def test_uploading_svg_with_inline_script_should_fail(self, file_name): with self.assertRaisesRegex(Fault, message): self.rpc_client.User.add_attachment("inline_javascript.svg", b64)
@parameterized.expand( [ "svg_with_onload_attribute.svg", ] ) def test_uploading_svg_with_forbidden_attributes_should_fail(self, file_name): with open(f"tests/ui/data/{file_name}", “rb”) as svg_file: b64 = base64.b64encode(svg_file.read()).decode()
message = str(_(“File contains forbidden attribute:”)) with self.assertRaisesRegex(Fault, message): self.rpc_client.User.add_attachment("image.svg", b64)
def test_uploading_filename_ending_in_dot_exe_should_fail(self): message = str(_(“Uploading executable files is forbidden”)) with self.assertRaisesRegex(Fault, message): Expand Down
Related news
### 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. S...