CVE-2023-30613: Kiwitcms Unrestricted File Upload Vulnerability

HIGH
Advisory Identifier: GHSA-fwcf-753v-fgcj
CVSS 7.7
CWE-434
Published
Advisory Summary

CVE-2023-30613 is a HIGH (CVSS 7.7) unrestricted file upload vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Kiwitcms libraries in the PyPI ecosystem. The issue involves unrestricted file upload in kiwi tcms. Remediation is available by upgrading affected packages to version 12.2.

CVE-2023-30613 at a Glance

CVE Identifier CVE-2023-30613
GHSA Identifier GHSA-fwcf-753v-fgcj
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Kiwitcms
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2023-30613

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.

kiwitcms fixed: 12.2
pip install kiwitcms>=12.2
Verify Direct and Transitive Dependencies

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-30613, 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.2), 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

### Impact Kiwi TCMS allows users to upload attachments to test plans, test cases, etc. In earlier versions there is no control over what kinds of files can be uploaded. Thus a malicious actor may upload an `.exe` file or a file containing embedded JavaScript and trick others into clicking on these files causing vulnerable browsers to execute malicious code on another computer or attempting XSS attacks. Stored XSS attacks via file uploads have been fixed in earlier versions of Kiwi TCMS, see [GHSA-2wcr-87wf-cf9j](https://github.com/kiwitcms/Kiwi/security/advisories/GHSA-2wcr-87wf-cf9j). This advisory deals with prohibiting users to upload potentially compromised files in the first place. ### Patches Kiwi TCMS v12.2 comes with functionality that allows administrators to configure additional upload validator functions which give them more control over what file types are accepted for upload. By default `.exe` are denied. Other files containing the `<script>` tag, regardless of their type are also denied b/c they are a path to XSS attacks. ### Workarounds Upgrade to version 12.2 or later. ### References Originally reported by [Ahmed Rabeaa Mosaa](https://huntr.dev/bounties/c30d3503-600d-4d00-9571-98826a51f12c).

CVE-2023-30613 Affected Kiwitcms Versions

1 component(s)
Fixed Versions:
12.2
Product / Package Ecosystem Affected Versions Fixed Version
kiwitcms
PyPI
< 12.2
12.2

References

Frequently Asked Questions

What is CVE-2023-30613?
CVE-2023-30613 is a security vulnerability in Kiwitcms involving Unrestricted file upload in kiwi TCMS under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Kiwitcms versions are affected?
Affected versions include releases prior to 12.2 across affected packages: kiwitcms.
What version fixes CVE-2023-30613?
Upgrading to 12.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is kiwitcms affected?
Yes, kiwitcms is affected in releases prior to 12.2. Upgrade your dependency to 12.2 or later.
What is the CVSS score of CVE-2023-30613?
CVE-2023-30613 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2023-30613?
CVE-2023-30613 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check PyPI dependencies for CVE-2023-30613?
Run the dependency tree command: 'pip show kiwitcms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fwcf-753v-fgcj",
  "modified" : "2025-04-11T23:44:47Z",
  "published" : "2023-04-24T22:44:12Z",
  "aliases" : [ "CVE-2023-30613" ],
  "summary" : "Unrestricted file upload in kiwi TCMS",
  "details" : "### Impact\nKiwi TCMS allows users to upload attachments to test plans, test cases, etc. In earlier versions there is no control over what kinds of files can be uploaded. Thus a malicious actor may upload an `.exe` file or a file containing embedded JavaScript and trick others into clicking on these files causing vulnerable browsers to execute malicious code on another computer or attempting XSS attacks.\n\nStored XSS attacks via file uploads have been fixed in earlier versions of Kiwi TCMS, see [GHSA-2wcr-87wf-cf9j](https://github.com/kiwitcms/Kiwi/security/advisories/GHSA-2wcr-87wf-cf9j). This advisory deals with prohibiting users to upload potentially compromised files in the first place.\n\n\n### Patches\nKiwi TCMS v12.2 comes with functionality that allows administrators to configure additional upload validator functions which give them more control over what file types are accepted for upload. By default `.exe` are denied. Other files containing the `<script>` tag, regardless of their type are also denied b/c they are a path to XSS attacks.\n\n\n\n### Workarounds\nUpgrade to version 12.2 or later.\n\n### References\nOriginally reported by [Ahmed Rabeaa Mosaa](https://huntr.dev/bounties/c30d3503-600d-4d00-9571-98826a51f12c).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "kiwitcms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "12.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kiwitcms/Kiwi/security/advisories/GHSA-fwcf-753v-fgcj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-30613"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kiwitcms/Kiwi"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/c30d3503-600d-4d00-9571-98826a51f12c"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/c30d3503-600d-4d00-9571-98826a51f12c"
  }, {
    "type" : "WEB",
    "url" : "https://kiwitcms.org/blog/kiwi-tcms-team/2023/04/23/kiwi-tcms-122"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-04-24T22:44:12Z",
    "nvd_published_at" : "2023-04-24T17:15:10Z"
  }
}