The vulnerability is a stored Cross-Site Scripting (XSS) issue in Kiwi TCMS. The root cause is the lack of input validation on the extra_link fields of the TestCase and TestPlan models. These fields were defined as CharField, which does not enforce any specific format, allowing users to input malicious javascript: URIs.
The patch, identified in commit d5d36e74cf9333cb37e3a8743b22b74dfa9a0139, addresses this by changing the field type from CharField to URLField and adding a URLValidator. This validator restricts the allowed URL schemes to http, https, ftp, and ftps, effectively preventing the injection of javascript: URIs.
During exploitation, a user would save a TestCase or TestPlan with a malicious extra_link. The application would then store this link in the database. When another user views the TestCase or TestPlan, the malicious link would be rendered in the browser, executing the embedded JavaScript. Therefore, the save methods of the TestCase and TestPlan models are the key functions that would appear in a runtime profile during the storage phase of the attack.