The vulnerability is a classic stored Cross-Site Scripting (XSS) issue within NocoDB's rich text and comment functionalities. The root cause is the rendering of user-provided content directly into the DOM using Vue.js's v-html directive without prior sanitization. The vulnerability description specifically highlights TextArea.vue where rich text from a cell is rendered. The analysis of the patches between the vulnerable version 0.301.2 and the patched version 0.301.3 confirms this and reveals a broader scope of the issue.
The primary fix is in commit 468bdd63b8b3ddb1604131f7d25e227725bf6a55, which replaces v-html with v-dompurify-html in packages/nc-gui/components/cell/TextArea.vue. This directly addresses the vulnerability mentioned in the advisory.
A related commit, c4fcf94c20d6097b2ff6cec1f1aae2caca2c7d0f, applies the same fix to other components (Comments.vue, ExpandedText.vue, Formula.vue) that were also improperly using v-html. Furthermore, this commit adds backend sanitization in packages/nocodb/src/services/comments.service.ts within the commentCreate and commentUpdate functions, providing defense-in-depth by cleaning the data before it's even stored in the database.
An attacker with permissions to edit rich text fields or post comments could inject a malicious script. When another user views the compromised rich text cell or comment, the script would execute in their browser, potentially leading to session hijacking, data theft, or further attacks. The identified vulnerable functions are the points where either the unsanitized data is processed on the backend or rendered on the frontend.