# CVE-2026-33442: Kysely has a MySQL SQL Injection via Backslash Escape Bypass in non-type-safe usage of JSON path keys.

> Attackers can inject arbitrary SQL via backslash escape bypass in Kysely when using JSON path keys on MySQL.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Mar 2026
- **Updated:** 26 Mar 2026
- **Also known as:** GHSA-fr9j-6mvq-frcv

## What is CVE-2026-33442?

CVE-2026-33442 is a high-severity SQL injection vulnerability in kysely-org kysely, published on 26 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Kysely is a type-safe TypeScript SQL query builder. In versions 0.28.12 and 0.28.13, the `sanitizeStringLiteral` method in Kysely's query compiler escapes single quotes (`'` → `''`) but does not escape backslashes. On MySQL with the default `BACKSLASH_ESCAPES` SQL mode, an attacker can inject a backslash before a single quote to neutralize the escaping, breaking out of the JSON path string literal and injecting arbitrary SQL. Version 0.28.14 fixes the issue.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2026-33442?

2 open source packages ship an affected version, including kysely. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kysely` | npm | From 0.28.12 | 0.28.14 |
| `kysely` | npm | From 0.28.12 | 0.28.14 |

Products: Kysely Kysely.

## How do I fix CVE-2026-33442?

Upgrade kysely to 0.28.14 or later.

## Is CVE-2026-33442 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33442 exists.

## Other vulnerabilities in kysely-org kysely

- [CVE-2026-32763](https://insights.sbomify.com/CVE-2026-32763/): SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely<any>`. (high 8.2)
- [CVE-2026-33468](https://insights.sbomify.com/CVE-2026-33468/): Kysely has a MySQL SQL Injection via Insufficient Backslash Escaping in `sql.lit(string)` usage or similar methods that append string literal values into the compiled SQL strings (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-33442 and fix it if it is affected.

What it is: CVE-2026-33442 is a high-severity SQL injection vulnerability in kysely-org kysely, published on 26 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33442 exists.

Affected packages and fixed versions:
- kysely (npm): affected from 0.28.12; fixed in 0.28.14
- kysely (npm): affected from 0.28.12; fixed in 0.28.14

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-33442/ (Markdown: https://insights.sbomify.com/CVE-2026-33442/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-33442
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-33442
- OSV: https://osv.dev/vulnerability/CVE-2026-33442

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-33442/
Summaries are generated and may contain mistakes; the official description above is the record.
