# CVE-2022-4105: Cross-site Scripting (XSS) - Stored in kiwitcms/kiwi

> Stored XSS in Kiwi TCMS allows attackers to execute malicious JavaScript, enabling clickjacking and UI manipulation.

- **Severity:** High 7.1 (`CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Nov 2022
- **Updated:** 14 Apr 2025
- **Also known as:** GHSA-hf94-8mx5-2vvj, PYSEC-2026-837

## What is CVE-2022-4105?

CVE-2022-4105 is a high-severity cross-site scripting vulnerability in kiwitcms/kiwi, published on 21 Nov 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A stored XSS in a kiwi Test Plan can run malicious javascript which could be chained with an HTML injection to perform a UI redressing attack (clickjacking) and an HTML injection which disables the use of the history page.

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

## Which versions are affected by CVE-2022-4105?

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


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

Products: Kiwitcms Kiwi Tcms.

## How do I fix CVE-2022-4105?

Upgrade kiwitcms to 11.6 or later.

## Is CVE-2022-4105 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-4105 exists.

## 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-2022-4105 and fix it if it is affected.

What it is: CVE-2022-4105 is a high-severity cross-site scripting vulnerability in kiwitcms/kiwi, published on 21 Nov 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-4105 exists.

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

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-2022-4105/ (Markdown: https://insights.sbomify.com/CVE-2022-4105/index.md)
```

## Sources

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

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