CVE-2026-32763: Kysely SQL injection in JSON path compilation

CVE-2026-32763 · Severity: low · CVSS 3.1 · Published 2026-03-18

Kysely is a TypeScript SQL query builder used by developers to construct database queries safely. A vulnerability in versions 0.26.0 through 0.28.11 allows attackers to inject arbitrary SQL code through JSON path keys in MySQL and SQLite queries, enabling unauthorized data access or manipulation. This affects applications that pass user input directly to JSON path methods like .key() without additional validation.

Technologies: kysely (npm). Vendors: npm.

Quick answers

Is CVE-2026-32763 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-32763 being exploited in the wild.
How severe is CVE-2026-32763?
Low severity, with a CVSS score of 3.1, published 18 March 2026.
Which products and versions are affected?
kysely (npm) SEMVER:introduced=0.26.0,fixed=0.28.12.
Is there a fix for CVE-2026-32763?
Yes. kysely (npm): upgrade to 0.28.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-32763 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-32763?
Check whether you run kysely (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • kysely (npm): upgrade to 0.28.12 or later
    npm install kysely@0.28.12

Technical details

The vulnerability is a SQL injection in the visitJSONPathLeg() function of the query compiler. JSON path keys and array indices are appended directly into single-quoted SQL string literals without escaping single quotes, allowing an attacker to break out of the JSON path context. While the codebase includes a sanitizeIdentifier() function that properly doubles delimiters for SQL identifiers, the same protection is missing for JSON path values. PostgreSQL is unaffected because it uses a different code path (JSONOperatorChainNode) that reuses the existing sanitizeStringLiteral() function. The attack requires either type-checking to be disabled (Kysely<any>) or compilation errors to be silently ignored. Patch available in version 0.28.12 and later.

Affected products

  • Kysely Kysely 0.26.0 through 0.28.11

Identifiers

  • CVE-2026-32763
  • GHSA-wmrf-hv6w-mr66

Timeline

  • 2026-03-18: disclosed: GHSA-wmrf-hv6w-mr66 published
  • 2026-03-18: patched: Fixed in version 0.28.12

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.