GHSA-6XCX-7QMG-VJFQ

Vulnerability from github – Published: 2026-06-05 15:59 – Updated: 2026-06-05 15:59
VLAI
Summary
NocoDB: Reflected Cross-Site Scripting via Password Reset Token
Details

Summary

The password-reset page rendered the URL token directly into a JavaScript string literal in a server-rendered EJS template. EJS <%= %> HTML-entity-encodes a fixed set of characters but does not escape single quotes or backslashes, so a crafted token could break out of the JS string context and execute attacker-controlled script in the NocoDB origin. Triggering required only that a victim follow a malicious password-reset link.

Details

The vulnerable template embedded the token as:

token: '<%= token %>',

A token containing ';alert(document.cookie);// closes the single-quoted string and runs arbitrary JavaScript. The fix moves the token into an HTML attribute (data-token="…") and reads it from dataset.token at runtime, so EJS's HTML-entity escaping is sufficient.

Impact

  • Reflected XSS in the NocoDB origin via a phished password-reset URL.
  • No authentication required to trigger; affects any user who clicks the crafted link.
  • Same-origin script can read auth state and act on the victim's behalf.

Credit

This issue was reported by @fg0x0.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "nocodb"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2026.04.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-47376"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-05T15:59:53Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "### Summary\n\nThe password-reset page rendered the URL token directly into a JavaScript string literal in a server-rendered EJS template. EJS `\u003c%= %\u003e` HTML-entity-encodes a fixed set of characters but does not escape single quotes or backslashes, so a crafted token could break out of the JS string context and execute attacker-controlled script in the NocoDB origin. Triggering required only that a victim follow a malicious password-reset link.\n\n### Details\n\nThe vulnerable template embedded the token as:\n\n```ejs\ntoken: \u0027\u003c%= token %\u003e\u0027,\n```\n\nA token containing `\u0027;alert(document.cookie);//` closes the single-quoted string and runs arbitrary JavaScript. The fix moves the token into an HTML attribute (`data-token=\"\u2026\"`) and reads it from `dataset.token` at runtime, so EJS\u0027s HTML-entity escaping is sufficient.\n\n### Impact\n\n- Reflected XSS in the NocoDB origin via a phished password-reset URL.\n- No authentication required to trigger; affects any user who clicks the crafted link.\n- Same-origin script can read auth state and act on the victim\u0027s behalf.\n\n### Credit\n\nThis issue was reported by [@fg0x0](https://github.com/fg0x0).",
  "id": "GHSA-6xcx-7qmg-vjfq",
  "modified": "2026-06-05T15:59:53Z",
  "published": "2026-06-05T15:59:53Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nocodb/nocodb/security/advisories/GHSA-6xcx-7qmg-vjfq"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nocodb/nocodb"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nocodb/nocodb/releases/tag/2026.04.1"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "NocoDB: Reflected Cross-Site Scripting via Password Reset Token"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…