CVE-2023-33977: Kiwitcms Cross-Site Scripting Vulnerability
HIGHCVE-2023-33977 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Kiwitcms libraries in the PyPI ecosystem. The issue involves kiwitcms vulnerable to stored cross-site scripting via unrestricted file upload. Remediation is available by upgrading affected packages to version 12.4.
CVE-2023-33977 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).
How to Fix CVE-2023-33977
To remediate this vulnerability, upgrade all affected Kiwitcms 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 kiwitcms>=12.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show kiwitcms
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-33977, inspect your installed packages using pip:
pip show kiwitcms
Analyze the terminal output to locate any version of Kiwitcms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.4), your application is affected.
Note: The pip show kiwitcms command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Kiwitcms, 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-2023-33977 Affected Kiwitcms Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
kiwitcms
|
PyPI |
< 12.4
|
12.4
|
References
Frequently Asked Questions
What is CVE-2023-33977?
Which Kiwitcms versions are affected?
What version fixes CVE-2023-33977?
Is kiwitcms affected?
What is the CVSS score of CVE-2023-33977?
What CWE is associated with CVE-2023-33977?
How can I check PyPI dependencies for CVE-2023-33977?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2fqm-m4r2-fh98",
"modified" : "2023-06-06T16:46:16Z",
"published" : "2023-06-06T16:46:16Z",
"aliases" : [ "CVE-2023-33977" ],
"summary" : "kiwitcms vulnerable to stored cross-site scripting via unrestricted file upload",
"details" : "### Impact\n\nKiwi 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. \n\nThe 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.\n\n### Patches\n\n- Improved file upload validation code\n- Updated Nginx reverse proxy configuration for ***.tenant.kiwitcms.org**\n\n### Workarounds\n\nIf 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](https://github.com/kiwitcms/Kiwi/blob/master/etc/nginx.conf#L66-L68) and [etc/nginx.conf#L87](https://github.com/kiwitcms/Kiwi/blob/master/etc/nginx.conf#L87)\n\n### References\n\nDisclosed by [M Nadeem Qazi](https://huntr.dev/bounties/6aea9a26-e29a-467b-aa5a-f767f0c2ec96/).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "kiwitcms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "12.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 12.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kiwitcms/Kiwi/security/advisories/GHSA-2fqm-m4r2-fh98"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-33977"
}, {
"type" : "WEB",
"url" : "https://github.com/kiwitcms/kiwi/commit/d789f4b51025de4f8c747c037d02e1b0da80b034"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kiwitcms/Kiwi"
}, {
"type" : "WEB",
"url" : "https://github.com/kiwitcms/Kiwi/blob/master/etc/nginx.conf#L66-L68"
}, {
"type" : "WEB",
"url" : "https://github.com/kiwitcms/Kiwi/blob/master/etc/nginx.conf#L87"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/6aea9a26-e29a-467b-aa5a-f767f0c2ec96"
}, {
"type" : "WEB",
"url" : "https://kiwitcms.org/blog/kiwi-tcms-team/2023/06/06/kiwi-tcms-124"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434", "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-06T16:46:16Z",
"nvd_published_at" : "2023-06-06T19:15:12Z"
}
}