Lucene search

K
osvGoogleOSV:GHSA-H6R4-XVW6-JC5H
HistoryMay 13, 2024 - 7:59 p.m.

NocoDB Vulnerable to Stored Cross-Site Scripting in Formula.vue

2024-05-1319:59:07
Google
osv.dev
9
nocodb
stored cross-site scripting
formula.vue
vulnerability
attack
credentials
stealing
share
public viewing
malicious link

7.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

6.1 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

8.8%

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>

CPENameOperatorVersion
nocodblt0.202.9

7.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

6.1 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

8.8%

Related for OSV:GHSA-H6R4-XVW6-JC5H