CVE-2023-50717: Nocodb NocoDB Allows Preview Of Files Vulnerability

MODERATE
Advisory Identifier: GHSA-qg73-g3cf-vhhh
CVSS 5.7
CWE-434 CWE-79
Published
Advisory Summary

CVE-2023-50717 is a MODERATE (CVSS 5.7) nocodb allows preview of files vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Nocodb libraries in the npm ecosystem. The issue involves nocodb allows preview of files with dangerous content. Remediation is available by upgrading affected packages to version 0.202.10.

CVE-2023-50717 at a Glance

CVE Identifier CVE-2023-50717
GHSA Identifier GHSA-qg73-g3cf-vhhh
Severity MODERATE
CVSS v3.1 Base Score 5.7
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Nocodb
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-50717

To remediate this vulnerability, upgrade all affected Nocodb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nocodb fixed: 0.202.10
npm install nocodb@0.202.10
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls nocodb

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2023-50717, inspect your project dependencies using npm:

npm ls nocodb

Analyze the terminal output to locate any version of Nocodb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.202.10), your application is affected.

Note: The npm ls nocodb command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. In Nocodb, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary --- Attacker can upload a html file with malicious content. If user tries to open that file in browser malicious scripts can be executed leading Stored XSS(Cross-Site Script) attack. ### PoC --- NocoDB was configured using the Release Binary `Noco-macos-arm64`, and nocodb version 0.202.9 (currently the latest version) was used. binary hash infos: md5(164b727f287af56168bc16fba622d0b4) / sha256(43e8e97f4c5f5330613abe071a359f84e4514b7186f92954b678087c37b7832e) <img width="665" alt="image" src="https://user-images.githubusercontent.com/86613161/287472673-aeb60a02-2080-429f-8583-9f130ab62779.png"> ### 1. Run the binary to start the server and access the arbitrary table dashboard. <img width="830" alt="image" src="https://user-images.githubusercontent.com/86613161/287472852-98b2286e-ad66-45bf-b503-63780619d775.png"> Here, used the default `Features` table. ### 2. Click `+` in the table `field header` to add an `attachment` field. <img width="1173" alt="image" src="https://user-images.githubusercontent.com/86613161/287472936-98a67213-a547-4e71-915c-d2a43300530b.png"> ### 3. Click the `Add File(s)` button to select and upload files. <img width="1132" alt="image" src="https://user-images.githubusercontent.com/86613161/287473041-0801ff39-e48c-4746-8518-be825bfd5533.png"> Here, `test.html` containing `<script>alert(document.domain)</script>` was uploaded. ### 4. Check the uploaded file path. <img width="1163" alt="image" src="https://user-images.githubusercontent.com/86613161/287473337-b1c7c781-2fb5-4bd0-b464-dbd3d4158f04.png" ### 5. Access the uploaded file path. <img width="1201" alt="image" src="https://user-images.githubusercontent.com/86613161/287473278-410f9228-58e3-4ee4-b111-70cdbffa9ed5.png"> When the file path is accessed, the `<script>alert(document.domain)</script>` script statement contained in the file is executed and the server host appears in the alert message. ### Impact --- This allows remote attacker to execute JavaScript code in the context of the user accessing the vector. An attacker could have used this vulnerability to execute requests in the name of a logged-in user or potentially collect information about the attacked user by displaying a malicious form.

CVE-2023-50717 Affected Nocodb Versions

1 component(s)
Fixed Versions:
0.202.10
Product / Package Ecosystem Affected Versions Fixed Version
nocodb
npm
≥ 0.202.6
< 0.202.10
0.202.10

References

Frequently Asked Questions

What is CVE-2023-50717?
CVE-2023-50717 is a security vulnerability in Nocodb involving NocoDB Allows Preview of Files with Dangerous Content under CWE-434: Unrestricted Upload of File with Dangerous Type.
Which Nocodb versions are affected?
Affected versions include releases prior to 0.202.10 across affected packages: nocodb.
What version fixes CVE-2023-50717?
Upgrading to 0.202.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nocodb affected?
Yes, nocodb is affected in releases prior to 0.202.10. Upgrade your dependency to 0.202.10 or later.
What is the CVSS score of CVE-2023-50717?
CVE-2023-50717 has a CVSS v3.1 base score of 5.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-50717?
CVE-2023-50717 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check npm dependencies for CVE-2023-50717?
Run the dependency tree command: 'npm ls nocodb'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qg73-g3cf-vhhh",
  "modified" : "2025-08-21T19:16:05Z",
  "published" : "2024-05-13T16:46:49Z",
  "aliases" : [ "CVE-2023-50717" ],
  "summary" : "NocoDB Allows Preview of Files with Dangerous Content",
  "details" : "### Summary\n---\nAttacker can upload a html file with malicious content. If user tries to open that file in browser malicious scripts can be executed leading  Stored XSS(Cross-Site Script) attack.\n\n### PoC\n---\nNocoDB was configured using the Release Binary `Noco-macos-arm64`, and nocodb version 0.202.9 (currently the latest version) was used.\nbinary hash infos: md5(164b727f287af56168bc16fba622d0b4) / sha256(43e8e97f4c5f5330613abe071a359f84e4514b7186f92954b678087c37b7832e)\n<img width=\"665\" alt=\"image\" src=\"https://user-images.githubusercontent.com/86613161/287472673-aeb60a02-2080-429f-8583-9f130ab62779.png\">\n\n### 1. Run the binary to start the server and access the arbitrary table dashboard.\n<img width=\"830\" alt=\"image\" src=\"https://user-images.githubusercontent.com/86613161/287472852-98b2286e-ad66-45bf-b503-63780619d775.png\">\n\nHere, used the default `Features` table.\n\n### 2. Click `+` in the table `field header` to add an `attachment` field.\n<img width=\"1173\" alt=\"image\" src=\"https://user-images.githubusercontent.com/86613161/287472936-98a67213-a547-4e71-915c-d2a43300530b.png\">\n\n### 3. Click the `Add File(s)` button to select and upload files.\n\n<img width=\"1132\" alt=\"image\" src=\"https://user-images.githubusercontent.com/86613161/287473041-0801ff39-e48c-4746-8518-be825bfd5533.png\">\n\nHere, `test.html` containing `<script>alert(document.domain)</script>` was uploaded.\n\n### 4. Check the uploaded file path.\n<img width=\"1163\" alt=\"image\" src=\"https://user-images.githubusercontent.com/86613161/287473337-b1c7c781-2fb5-4bd0-b464-dbd3d4158f04.png\"\n\n### 5. Access the uploaded file path.\n<img width=\"1201\" alt=\"image\" src=\"https://user-images.githubusercontent.com/86613161/287473278-410f9228-58e3-4ee4-b111-70cdbffa9ed5.png\">\n\nWhen the file path is accessed, the `<script>alert(document.domain)</script>` script statement contained in the file is executed and the server host appears in the alert message.\n\n\n### Impact\n---\nThis allows remote attacker to execute JavaScript code in the context of the user accessing the vector. An attacker could have used this vulnerability to execute requests in the name of a logged-in user or potentially collect information about the attacked user by displaying a malicious form.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nocodb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.202.6"
      }, {
        "fixed" : "0.202.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.202.9"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nocodb/nocodb/security/advisories/GHSA-qg73-g3cf-vhhh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50717"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nocodb/nocodb"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-13T16:46:49Z",
    "nvd_published_at" : "2024-05-14T14:17:01Z"
  }
}