{"id":"CVE-2026-47376","aliases":["GHSA-6xcx-7qmg-vjfq"],"url":"https://o3.security/vulnerability/CVE-2026-47376","summary":"NocoDB: Reflected Cross-Site Scripting via Password Reset Token","details":"### Summary\n\nThe 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.\n\n### Details\n\nThe vulnerable template embedded the token as:\n\n```ejs\ntoken: '<%= token %>',\n```\n\nA 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.\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's behalf.\n\n### Credit\n\nThis issue was reported by [@fg0x0](https://github.com/fg0x0).","published":"2026-06-23T20:35:37.248Z","modified":"2026-08-12T03:51:48.788458953Z","cvss":null,"epss":{"score":0.00444,"percentile":0.37813,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"nocodb","fixedVersion":"2026.04.1"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47376.json"},{"type":"ADVISORY","url":"https://github.com/nocodb/nocodb/security/advisories/GHSA-6xcx-7qmg-vjfq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47376"},{"type":"PACKAGE","url":"https://github.com/nocodb/nocodb"},{"type":"WEB","url":"https://github.com/nocodb/nocodb/releases/tag/2026.04.1"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:48.788458953Z"}}