Dev.to Security 🔐 Cybersecurity 👁 0 📖 2 min read

A base-scoped NocoDB token has to stay inside its base

A base-scoped NocoDB token has to stay inside its base NocoDB organizes data into bases and exposes API tokens for automation and integrations. CVE-2026-126283 affects versions before 2026.08.0. The reported flaw is th

A base-scoped NocoDB token has to stay inside its base

NocoDB organizes data into bases and exposes API tokens for automation and integrations. CVE-2026-126283 affects versions before 2026.08.0. The reported flaw is that a base-scoped API token was not bound to its base when authorization was evaluated, so the token could act as an account-wide credential.

The authorization gap

The key phrase in the advisory is that the token's base_id was never stored or checked. A token may look scoped in the UI and in documentation, but the server must persist the scope and enforce it on every request. If it only authenticates the token and then resolves the requested base from the URL, an attacker who has a token for one base can substitute another base ID.

The server must store the token scope and enforce it on every request. A long random token with the wrong server-side scope is still too broad. The application needs to attach the token to an owner, a role, a base, and an allowed operation set. The check must happen after parsing the request and before returning rows or applying changes. Hiding the other bases in a user interface does not protect the API.

What an attacker can reach

The practical impact depends on what the token was allowed to do and what the target base contains. A read token may expose tables, views, and records across the account. A write token may change data, create views, or affect automation. The CVE is scored 8.7 high, which reflects a serious authorization failure, but the victim-specific outcome still needs to be measured from the token's role and the account's data model.

Tokens are commonly issued for a specific integration and then forgotten. A token used for a dashboard may remain valid after the dashboard is retired. A token issued to a contractor may survive the project. NocoDB administrators should treat the pre-fix period as a token-scope incident: list tokens, identify the issuing user, determine which bases were reachable under the flawed check, and decide which tokens need rotation.

Remediation

Upgrade to NocoDB 2026.08.0 or later. Verify the running image digest and the package version used by the application, especially when a managed deployment keeps its own release channel. After the upgrade, test a base-scoped token against its own base and against a second base owned by the same account. The second request must fail even when the token is valid and the target base exists.

Rotate tokens that could have been used while the service was vulnerable. Store the new tokens with the narrowest practical base and operation scope. Remove tokens that have no owner or documented integration. Restrict API access to trusted networks where the integration permits it, and log the token identity, base ID, operation, and result so scope changes are visible.

For defense in depth, separate read and write credentials and use a distinct integration account from the human administrator account. Add an alert for a token appearing against more than one base in a short period. Do not accept a successful login as evidence that the scope works. The failure should occur at the object-authorization layer, not in the token syntax parser.

References

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.