Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-46424 — backend-core

🟡 CVSS 4.2 — Medium ✅ No Known Exploit CWE-269 NVD
4.2
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Budibase: Missing Cache Invalidation on Public API Role Unassignment Allows Revoked Users to Retain Privileges for Up to 1 Hour

Summary

The public API role unassignment endpoint (POST /api/public/v1/roles/unassign) updates user documents in CouchDB but does not invalidate the corresponding Redis user cache entries. Because the authentication middleware resolves user identity and permissions from this cache (TTL: 3600 seconds), a user whose admin, builder, or app-level roles have been revoked via the public API retains those privileges for up to 1 hour.

Details

The root cause is an inconsistency between the UserDB.save() and UserDB.bulkUpdate() code paths.

Vulnerable pathpackages/pro/src/sdk/publicApi/roles.ts:49-75:

```typescript

export async function unAssign(userIds: string[], opts: AssignmentOpts) {

// ... modifies user objects: deletes roles, admin, builder ...

await userDB.bulkUpdate(users) // line 74

}

```

bulkUpdate delegates to bulkUpdateGlobalUsers() at packages/backend-core/src/users/users.ts:82-85:

```typescript

export async function bulkUpdateGlobalUsers(users: User[]) {

const db = getGlobalDB()

return (await db.bulkDocs(users)) as BulkDocsResponse

}

```

This writes directly to CouchDB with no cache invalidation.

Correct pathpackages/backend-core/src/users/db.ts:355 (used by admin UI):

```typescript

await cache.user.invalidateUser(response.id)

```

Cache configurationpackages/backend-core/src/cache/user.ts:11:

```typescript

const EXPIRY_SECONDS = 3600 // 1 hour TTL

```

Authentication middlewarepackages/backend-core/src/middleware/authenticated.ts:153-160:

```typescript

user = await getUser({

userId,

tenantId: session.tenantId,

email: session.email,

})

```

getUser() reads from Redis cache first; it only falls back to CouchDB on cache miss. After unAssign updates CouchDB without invalidating Redis, every authenticated request continues to use the stale cached user object with the old (revoked) privileges.

Notably, other bulk operations in the codebase handle this correctly — groups.addUsers() and groups.removeUsers() in packages/pro/src/sdk/groups/groups.ts both loop through affected users and call cache.user.invalidateUser() after bulkUpdateGlobalUsers(). The public API roles path was missed.

PoC

```bash

# Prerequisites: Enterprise license, admin API key, a second user with admin role

# Step 1: Confirm user has admin access

curl -s -X GET http://localhost:10000/api/global/roles \

-H 'Cookie: budibase:auth=<target-user-session>' \

-H 'x-budibase-app-id: app_xyz'

# Returns 200 with roles list

# Step 2: Revoke admin role via public API

curl -s -X POST http://localhost:10000/api/public/v1/roles/unassign \

-H 'x-budibase-api-key: <admin-api-key>' \

-H 'Content-Type: application/json' \

-d '{"userIds": ["<target-user-id>"], "admin": true}'

# Returns 200 — role removed from CouchDB

# Step 3: Verify DB was updated (admin field removed)

# (check CouchDB directly - user document no longer has admin: {global: true})

# Step 4: Immediately retry admin endpoint as revoked user

curl -s -X GET http://localhost:10000/api/global/roles \

-H 'Cookie: budibase:auth=<target-user-session>' \

-H 'x-budibase-app-id: app_xyz'

# STILL returns 200 — stale cache serves old admin privileges

# Step 5: Wait for cache expiry (up to 3600 seconds) and retry

# After cache expires, the request correctly returns 403

```

Impact

A user whose admin, builder, or app-level roles have been revoked via the public API retains full access to those privileges for up to 1 hour. This is particularly concerning in automated offboarding scenarios where HR/IT systems use the public API to revoke access for terminated employees — the terminated user retains admin/builder access to all applications and data during the cache window.

The impact is bounded by:

  • Requires enterprise license (expanded public API feature)
  • Maximum 1-hour window before cache expires
  • Only affects the public API revocation path; revocations via the admin UI (UserDB.save()) invalidate cache correctly
  • The assign direction has the inverse issue (newly granted roles are delayed) but this is less security-critical

Recommended Fix

Add cache invalidation to bulkUpdateGlobalUsers or to the callers that need it. The most targeted fix is in the unAssign function:

```typescript

// packages/pro/src/sdk/publicApi/roles.ts

import { cache } from "@budibase/backend-core"

export async function unAssign(userIds: string[], opts: AssignmentOpts) {

// ... existing role removal logic ...

await userDB.bulkUpdate(users)

// Invalidate cache for all affected users

await Promise.all(

users.map(user => cache.user.invalidateUser(user._id!))

)

}

```

Alternatively, fix it at the bulkUpdate level to prevent future callers from having the same gap:

```typescript

// packages/backend-core/src/users/db.ts

static async bulkUpdate(users: User[])

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity low, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: High — the attacker first has to win a race, learn a secret or otherwise prepare the target.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: None.

Weakness class

CVE-2026-46424 is classified as CWE-269: Improper Privilege Management. Privileges are assigned, dropped or restored incorrectly, leaving an actor with more access than intended.

Affected software

CVE-2026-46424 is recorded against 2 packages.

  • @budibase/backend-core
  • unknown

Timeline and source

Published on 19 May 2026 and last revised on 9 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
github.com (Web)

Other advisories for this package

@budibase/backend-core has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-269: Improper Privilege Management) in other software:

Details

Severity Medium
CVSS Score 4.2
CVSS Vector CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N
CWE CWE-269
Public Exploit ✅ No
Source NVD
Published 2026-05-19
Updated 2026-08-20
Modified 2026-06-09
Fix URL N/A

Affected Packages

Software From version Fixed in
@budibase/backend-core
unknown

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in backend-core

CVE-2026-46424 is rated CVSS 4.2 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026