SQL Injection Affecting nocodb package, versions <0.202.10


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-NOCODB-6839433
  • published14 May 2024
  • disclosed13 May 2024
  • creditpyozzi-toss

Introduced: 13 May 2024

CVE-2023-50718  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade nocodb to version 0.202.10 or higher.

Overview

nocodb is a NocoDB

Affected versions of this package are vulnerable to SQL Injection through the columnList method. An attacker with create access can execute arbitrary SQL commands and potentially access or modify sensitive data by including a special character (') in the table name to manipulate the SQL query.

PoC

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`,
      );

References

CVSS Scores

version 3.1