CVE-2023-50718
JSON

6.5medium

NocoDB SQL Injection vulnerability

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.70% (higher than 54% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8fxg-mr34-jqr8

Description

NocoDB is software for building databases as spreadsheets. Prior to version 0.202.10, an authenticated attacker with create access could conduct a SQL Injection attack on MySQL DB using unescaped `table_name`. This vulnerability may result in leakage of sensitive data in the database. Version 0.202.10 contains a patch for the issue.

Affected

Product or packageVersionsReported by
nocodb nocodb< 0.202.10, before 0.202.10CVE List, NVD
nocodb (npm)before 0.202.10GitHub Advisory Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

NocoDB is software for building databases as spreadsheets. Prior to version 0.202.10, an authenticated attacker with create access could conduct a SQL Injection attack on MySQL DB using unescaped `table_name`. This vulnerability may result in leakage of sensitive data in the database. Version 0.202.10 contains a patch for the issue.

GitHub Advisory Database
Summary

An authenticated attacker with create access could conduct a SQL Injection attack on MySQL DB using unescaped table_name.

Details

SQL Injection vulnerability occurs in VitessClient.ts.
async columnList(args: any = {}) {
    const func = this.columnList.name;
    const result = new Result();
    log.api(`${func}:args:`, args);

    try {
      args.databaseName = this.connectionConfig.connection.database;

      const response = await this.sqlClient.raw(
        `select *, table_name as tn from information_schema.columns where table_name = '${args.tn}' ORDER by ordinal_position`,
      );

The variable ${args.tn} refers to the table name entered by the user. A malicious attacker can escape the existing query by including a special character (') in the table name and insert and execute a new arbitrary SQL query.

Impact

This vulnerability may result in leakage of sensitive data in the database.

NVD (es)

NocoDB es un software para crear bases de datos como hojas de cálculo. Antes de la versión 0.202.10, un atacante autenticado con acceso de creación podía realizar un ataque de inyección SQL en una base de datos MySQL utilizando `table_name` sin escape. Esta vulnerabilidad puede provocar la fuga de datos confidenciales en la base de datos. La versión 0.202.10 contiene un parche para el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-50718 changed 2024-08-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-8fxg-mr34-jqr8 changed 2026-09-10CC-BY-4.0
NVDCVE-2023-50718 changed 2026-06-17Public domain