{"id":"CVE-2026-47376","aliases":["CVE-2026-47376","GHSA-6xcx-7qmg-vjfq"],"related":[],"kind":"vulnerability","state":"published","title":"NocoDB: Reflected Cross-Site Scripting via Password Reset Token","summary":"NocoDB is software for building databases as spreadsheets. Prior to 2026.04.1, 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. This vulnerability is fixed in 2026.04.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"NocoDB is software for building databases as spreadsheets. Prior to 2026.04.1, 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. This vulnerability is fixed in 2026.04.1.","source":"cvelist"},{"lang":"en","text":"### 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).","format":"markdown","source":"ghsa"}],"published":"2026-06-05T15:59:53.000Z","modified":"2026-07-20T21:30:33.174Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 2026.04.1","status":"affected"}],"vendor":"nocodb","product":"nocodb","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2026.04.1"}],"ecosystem":"npm","package":"nocodb","purl":"pkg:npm/nocodb","source":"ghsa"}],"references":[{"url":"https://github.com/nocodb/nocodb/security/advisories/GHSA-6xcx-7qmg-vjfq","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47376","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nocodb/nocodb","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/nocodb/nocodb/releases/tag/2026.04.1","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-24T13:58:03.962Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47376","url":"https://www.cve.org/CVERecord?id=CVE-2026-47376","licence":"CVE Terms of Use","modified":"2026-06-24T13:58:16.268Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6xcx-7qmg-vjfq","url":"https://github.com/advisories/GHSA-6xcx-7qmg-vjfq","licence":"CC-BY-4.0","modified":"2026-07-20T21:30:33.174Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47376","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47376","licence":"Public domain","modified":"2026-06-25T14:21:00.260Z"}],"updatedAt":"2026-11-25T22:59:25.541Z","epss":{"score":0.00262,"percentile":0.19243,"date":"2026-12-01T12:00:22.000Z"}}