CVE-2026-44635: Kysely JSONPath Traversal Injection Vulnerability
Summary
CVE-2026-44635: Kysely 0.28.12 added a sanitizeStringLiteral() call inside DefaultQueryCompiler.visitJSONPathLeg (commit 0a602bf, PR #1727) to fix CVE-2026-32763 (GHSA-wmrf-hv6w-mr66). Affects kysely versions >= 0.26.0, < 0.28.17. Fixed in 0.28.17. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Kysely is a TypeScript SQL query builder designed for building SQL queries in a type-safe manner. It supports various databases, including MySQL, PostgreSQL, and SQLite. The package allows developers to construct complex queries while maintaining type safety, making it a popular choice for TypeScript applications. However, a recent vulnerability has been identified that exposes sensitive data through improper handling of JSONPath queries.
Vulnerability Detail
The vulnerability arises from a flaw in the JSONPathBuilder.key() and .at() methods within Kysely version 0.28.12 and earlier. The issue stems from the inadequate sanitization of user-controlled input, allowing attackers to inject JSONPath metacharacters such as '.', '[', ']', '*', '**', and '?' into queries. This can lead to unauthorized access to JSON sub-fields, enabling attackers to read or write data that should be restricted. The vulnerability was introduced when a fix for a previous issue only addressed single quotes, leaving other critical characters unescaped. As a result, attackers can traverse the JSON structure and access sensitive information, such as internal identifiers and tokens, that developers intended to keep private.
How To Fix
Latest published version: 0.29.7 as of 23 Oct 2026
npm install kysely@0.29.7
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.28.17
This is the first release that contains the fix.
npm install kysely@0.28.17
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using user-controlled input directly in the .key() or .at() methods. Instead, validate and sanitize any input before passing it to these methods. For example, you can implement a function to check for valid JSONPath characters and reject any input that contains metacharacters.
Conclusion
The CVE-2026-44635 vulnerability in Kysely poses a significant risk by allowing unauthorized access to sensitive JSON data through improper input handling. It is crucial for developers using Kysely to update to the patched version 0.28.17 to protect their applications from potential data breaches. Implementing input validation and sanitization can serve as a temporary measure until the update is applied.
See every vulnerability recorded for kysely →
FAQ
The CVSS score of this vulnerability is 7.5, indicating a high severity level.
Kysely versions 0.28.12 and earlier are affected by this vulnerability.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Additionally, you can check your application using the Vulert playground without any signup.
The vulnerability affects MySQL, PostgreSQL, and SQLite dialects when using Kysely.
If you cannot update immediately, ensure to validate and sanitize any user input before using it in JSONPath queries to mitigate the risk.
References
Related vulnerabilities
Recent vulnerabilities recorded for kysely.