# CVE-2023-27489: Stored cross site scripting via SVG file upload in Kiwi TCMS

> Attackers can execute arbitrary JavaScript via uploaded SVG files in Kiwi TCMS, potentially compromising user sessions.

- **Severity:** High 7.6 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 Mar 2023
- **Updated:** 12 Feb 2025
- **Also known as:** GHSA-2wcr-87wf-cf9j, PYSEC-2026-1496

## What is CVE-2023-27489?

CVE-2023-27489 is a high-severity cross-site scripting vulnerability in kiwitcms Kiwi, published on 29 Mar 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Kiwi TCMS is an open source test management system for both manual and automated testing. Kiwi TCMS accepts SVG files uploaded by users which could potentially contain JavaScript code. If SVG images are viewed directly, i.e. not rendered in an HTML page, this JavaScript code could execute. This vulnerability has been fixed by configuring Kiwi TCMS to serve with the Content-Security-Policy HTTP header which blocks inline JavaScript in all modern browsers. This configuration change is provided in version 12.1 and users are advised to upgrade. Users unable to upgrade may set their Content-Security-Policy HTTP header manually.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2023-27489?

3 open source packages ship an affected version, including kiwitcms. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kiwitcms` | PyPI | All versions | 12.1 |
| `kiwitcms` | PyPI | All versions | 12.1 |
| `kiwitcms` | PyPI | All versions | 12.1 |

Products: Kiwitcms Kiwi Tcms.

## How do I fix CVE-2023-27489?

Upgrade kiwitcms to 12.1 or later.

## Is CVE-2023-27489 being exploited?

There is no known exploitation of CVE-2023-27489 in the wild and no public exploit code.

## Other vulnerabilities in kiwitcms Kiwi

- [CVE-2023-30628](https://insights.sbomify.com/CVE-2023-30628/): Kiwi TCMS has command injection vulnerability in changelog.yml CI workflow (high 8.8)
- [CVE-2023-36809](https://insights.sbomify.com/CVE-2023-36809/): Kiwi TCMS's misconfigured HTTP headers allow stored XSS execution with Firefox (high 8.1)
- [CVE-2023-33977](https://insights.sbomify.com/CVE-2023-33977/): Stored cross site scripting (XSS) via unrestricted file upload in Kiwi TCMS (high 8.1)
- [CVE-2023-32686](https://insights.sbomify.com/CVE-2023-32686/): kiwitcms vulnerable to stored XSS via unrestricted files upload (high 8.1)
- [CVE-2023-30613](https://insights.sbomify.com/CVE-2023-30613/): Kiwi TCMS unrestricted file upload vulnerability (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-27489 and fix it if it is affected.

What it is: CVE-2023-27489 is a high-severity cross-site scripting vulnerability in kiwitcms Kiwi, published on 29 Mar 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-27489 in the wild and no public exploit code.

Affected packages and fixed versions:
- kiwitcms (PyPI): affected all versions; fixed in 12.1
- kiwitcms (PyPI): affected all versions; fixed in 12.1
- kiwitcms (PyPI): affected all versions; fixed in 12.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-27489/ (Markdown: https://insights.sbomify.com/CVE-2023-27489/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-27489
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-27489
- OSV: https://osv.dev/vulnerability/CVE-2023-27489

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-27489/
Summaries are generated and may contain mistakes; the official description above is the record.
