SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely`.
Kysely is a type-safe TypeScript SQL query builder. Versions up to and including 0.28.11 has a SQL injection vulnerability in JSON path compilation for MySQL and SQLite dialects. The `visitJSONPathLeg()` function appends user-controlled values from `.key()` and `.at()` directly into single-quoted JSON path string literals (`'$.key'`) without escaping single quotes. An attacker can break out of the JSON path string context and inject arbitrary SQL. This is inconsistent with `sanitizeIdentifier()`, which properly doubles delimiter characters for identifiers — both are non-parameterizable SQL constructs requiring manual escaping, but only identifiers are protected. Version 0.28.12 fixes the issue.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-32763
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 05:05 UTC · Revision 1
Source evidence
SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely`.
core-osv · Original sourcePublished 19 Mar 2026, 23:14 UTC
Kysely is a type-safe TypeScript SQL query builder. Versions up to and including 0.28.11 has a SQL injection vulnerability in JSON path compilation for MySQL and SQLite dialects. The `visitJSONPathLeg()` function appends user-controlled values from `.key()` and `.at()` directly into single-quoted JSON path string literals (`'$.key'`) without escaping single quotes. An attacker can break out of the JSON path string context and inject arbitrary SQL. This is inconsistent with `sanitizeIdentifier()`, which properly doubles delimiter characters for identifiers — both are non-parameterizable SQL constructs requiring manual escaping, but only identifiers are protected. Version 0.28.12 fixes the issue.
osv:CVE-2026-32763
Complete source record
{
"id": "44b67790f2b628ff976ec8c7f0ae442cb7aebbb5c1a28969a3b3a42f6e7ef0f5",
"url": "https://osv.dev/vulnerability/CVE-2026-32763",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely`.",
"summary": "Kysely is a type-safe TypeScript SQL query builder. Versions up to and including 0.28.11 has a SQL injection vulnerability in JSON path compilation for MySQL and SQLite dialects. The `visitJSONPathLeg()` function appends user-controlled values from `.key()` and `.at()` directly into single-quoted JSON path string literals (`'$.key'`) without escaping single quotes. An attacker can break out of the JSON path string context and inject arbitrary SQL. This is inconsistent with `sanitizeIdentifier()`, which properly doubles delimiter characters for identifiers — both are non-parameterizable SQL constructs requiring manual escaping, but only identifiers are protected. Version 0.28.12 fixes the issue.",
"evidence": "osv:CVE-2026-32763",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-32763",
"aliases": [
"CVE-2026-32763",
"GHSA-wmrf-hv6w-mr66"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/kysely-org/kysely",
"type": "GIT",
"events": [
{
"introduced": "8d7b102ba847c9e75c8468ca42dd3ceb7210883d"
},
{
"fixed": "afc81a1a11a139114b891abd654424fcd8b6afaa"
},
{
"fixed": "0a602bff2f442f6c26d5e047ca8f8715179f6d24"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:kysely:kysely:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0.26.0"
},
{
"fixed": "0.28.12"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "0a602bff2f442f6c26d5e047ca8f8715179f6d24"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "afc81a1a11a139114b891abd654424fcd8b6afaa"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v0.28.12"
}
]
}
}
],
"versions": [
"v0.28.11",
"v0.28.10",
"v0.28.9",
"v0.28.8",
"v0.28.7",
"v0.28.6",
"v0.28.5",
"v0.28.4",
"v0.28.3",
"0.28.2",
"0.28.1",
"0.28.0",
"0.27.6",
"0.27.5",
"0.27.4",
"0.27.3",
"0.27.2",
"0.27.1",
"0.27.0",
"0.26.3",
"0.26.2",
"0.26.1",
"0.26.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-32763.json"
}
}
],
"modified": "2026-10-28T02:30:50.042749125Z",
"provider": "osv",
"references": [
"https://github.com/kysely-org/kysely/releases/tag/v0.28.12",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32763.json",
"https://github.com/kysely-org/kysely/security/advisories/GHSA-wmrf-hv6w-mr66",
"https://nvd.nist.gov/vuln/detail/CVE-2026-32763",
"https://github.com/kysely-org/kysely/commit/0a602bff2f442f6c26d5e047ca8f8715179f6d24"
],
"provider_metadata": {
"cwe_ids": [
"CWE-89"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32763.json"
}
},
"related_cves": [
{
"value": "CVE-2026-32763",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 518326,
"published_at": "2026-03-19T23:14:58.747+00:00"
}