NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-47376: NocoDB: Reflected Cross-Site Scripting via Password Reset Token

mediumCVSS 4.0 5.1GHSA-6xcx-7qmg-vjfq

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.

Published Jun 5, 2026 · Updated Jul 20, 2026

Affected packages

nocodb

Ecosystem
npm
Affected
< 2026.04.1
Fixed in
2026.04.1
Check
npm ls nocodb

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to fg0x0.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries