{"id":"CVE-2026-46550","aliases":["CVE-2026-46550","GHSA-f74w-272x-mqcv"],"related":[],"kind":"vulnerability","state":"published","title":"NocoDB: Refresh Token Cookie Set Without `Secure` and `SameSite` Flags","summary":"NocoDB is software for building databases as spreadsheets. Prior to 2026.04.1, the refresh-token cookie was set with httpOnly: true but missing both the secure flag and the sameSite attribute. Over plain HTTP the cookie could be intercepted on the network; without sameSite, browsers attached it to cross-site POSTs, enabling CSRF against the token-refresh endpoint. 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 refresh-token cookie was set with httpOnly: true but missing both the secure flag and the sameSite attribute. Over plain HTTP the cookie could be intercepted on the network; without sameSite, browsers attached it to cross-site POSTs, enabling CSRF against the token-refresh endpoint. This vulnerability is fixed in 2026.04.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe refresh-token cookie was set with `httpOnly: true` but missing both the `secure` flag and the `sameSite` attribute. Over plain HTTP the cookie could be intercepted on the network; without `sameSite`, browsers attached it to cross-site POSTs, enabling CSRF against the token-refresh endpoint.\n\n### Details\n\nIn `packages/nocodb/src/services/users/helpers.ts`, `setTokenCookie` produced the cookie with only `httpOnly`, an `expires` date, and an optional `domain` from `NC_BASE_HOST_NAME` — no `secure`, no `sameSite`. The refresh endpoint `POST /api/v2/auth/token/refresh` (`auth.controller.ts`) read the cookie unconditionally and returned a new JWT, with no CSRF token.\n\nThe fix sets `httpOnly: true`, `sameSite: 'lax'`, and conditional `secure: req.ncSiteUrl.startsWith('https')` so the flag is active under HTTPS while still functional on plain-HTTP localhost development.\n\nThis is distinct from GHSA-x4vh-j75g-268g (refresh-token lifecycle on password reset) — different root cause, different attack vector.\n\n### Impact\n\n- Cookie interception on plain HTTP networks (no `secure`).\n- Cross-site refresh: malicious cross-origin pages could trigger token refresh and, combined with any same-origin XSS or open-redirect on the NocoDB domain, capture the new JWT.\n- Refresh tokens have multi-day expiry (`NC_REFRESH_TOKEN_EXP_IN_DAYS`), so the exposure window is long.\n\n### Credit\n\nThis issue was reported by [@ik0z](https://github.com/ik0z).","format":"markdown","source":"ghsa"}],"published":"2026-05-21T20:35:24.000Z","modified":"2026-07-20T21:30:38.765Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-614"],"affected":[{"ranges":[{"version":"< 2026.04.1","status":"affected"}],"vendor":"nocodb","product":"nocodb","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"0.301.3"}],"ecosystem":"npm","package":"nocodb","purl":"pkg:npm/nocodb","source":"ghsa"}],"references":[{"url":"https://github.com/nocodb/nocodb/security/advisories/GHSA-f74w-272x-mqcv","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46550","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nocodb/nocodb","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-24T19:14:44.843Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46550","url":"https://www.cve.org/CVERecord?id=CVE-2026-46550","licence":"CVE Terms of Use","modified":"2026-06-24T19:15:39.836Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f74w-272x-mqcv","url":"https://github.com/advisories/GHSA-f74w-272x-mqcv","licence":"CC-BY-4.0","modified":"2026-07-20T21:30:38.765Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46550","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46550","licence":"Public domain","modified":"2026-06-25T14:21:00.260Z"}],"updatedAt":"2026-11-25T22:59:25.538Z","epss":{"score":0.00099,"percentile":0.00838,"date":"2026-12-01T12:00:22.000Z"}}