Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-123488-CraftCMS-Lab — PoC for CVE-2026-123488: unauthenticated SQLi in the element search endpoint (CWE-89) escalating to admin via stacked UPDATE; | Kitploit
Tools/GitHubGitHub/dinosn/cve-2026-123488-craftcms-lab
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityLabs & Practice
GitHubdinosn/cve-2026-123488-craftcms-lab

CVE-2026-123488-CraftCMS-Lab

Share

PoC for CVE-2026-123488: unauthenticated SQLi in the element search endpoint (CWE-89) escalating to admin via stacked UPDATE;

View Repository
111 days agoNot yet reviewed

CVE-2026-123488 — Craft CMS unauthenticated SQL injection lab + PoC

A/B Docker lab (vulnerable 4.18.8 vs patched 4.18.9 control) plus a lab-validated PoC for the unauthenticated SQL injection in the Craft CMS element search endpoint. The PoC escalates to administrator by stacking an UPDATE users SET admin=1 — unauthenticated, no CVE-unassigned guessing, verified causally against the A/B pair.

Vulnerability

CVECVE-2026-123488 (GHSA-qcvp-ggx3-97r6)
ProductCraft CMS (craftcms/cms) 4.0.0 – 4.18.8, 5.0.0 – 5.11.1
Fixed4.18.9 / 5.11.2 (2026-09-17; CVE assigned 2026-11-06, ~50-day gap)
CWECWE-89, CVSS 3.1 9.8 (AV:N/AC:L/PR:N/UI:N), CVSS 4.0 9.3
RequiresMySQL/MariaDB backend (PDO ATTR_EMULATE_PREPARES=1, the default)

A search parameter sent as a PHP array reaches Search::normalizeSearchQuery(), which merges every attacker-supplied key into SearchQuery default term options and stamps them onto each parsed term. The attribute key flows into Search::_sqlWhere(), which quotes the column name but interpolates the value raw. With emulated prepares, stacked statements execute — arbitrary read/write, including the admin flag on users. The 4.18.9 fix adds an allowlist (ALLOWED_DEFAULT_TERM_OPTIONS = ['subLeft','subRight','exclude','exact']) and value quoting.

Any public template that passes request input into an element query search works as a sink, e.g. craft.entries().search(param('search')). This repo's lab ships one (templates/search.html).

Lab

docker compose up -d          # builds two Craft installs + MySQL 8
# wait ~2 min for both installs (watch: docker compose logs -f craft-vuln)
vulnerable: http://localhost:18080  (Craft 4.18.8)
patched:    http://localhost:18081  (Craft 4.18.9, negative control)
CP:          /index.php?p=admin   (admin / adminadmin)

Both installs share one MySQL container (separate DBs craft_vuln / craft_patched); both expose the same search sink so the A/B comparison is like-for-like.

PoC

# dry run — prints the request, sends nothing (safe default)
python3 poc.py --check-url "http://localhost:18080/index.php?p=search"

# detection only — time-based sleep() oracle, no write
python3 poc.py --detect --target "http://localhost:18080/index.php?p=search" --delay 3

# exploit — detection, then stacked UPDATE users SET admin=1 (writes!)
python3 poc.py --exploit --target "http://localhost:18080/index.php?p=search" --delay 3

Delay scales with the rows scanned by the outer query (the sleep runs per row): a 3s sleep measured 18s on the lab's populated sink, so drop --delay on larger sites.

Validation

./validate-lab.sh runs the full A/B battery and prints the verdict table:

  1. resets admin=0 on both databases (causal baseline),
  2. runs the detection oracle against 4.18.8 and the 4.18.9 control,
  3. fires the stacked UPDATE on 4.18.8,
  4. verifies the flag only on the vulnerable side flipped (0 → 1) while the patched control is untouched,
  5. prints the PDO ATTR_EMULATE_PREPARES prerequisite.

Measured on this lab (6 candidate rows through the sink):

Check4.18.8 (vulnerable)4.18.9 (control)
Detection (sleep 3)18.0s0.0s
Detection (sleep 5)30.0s0.0s
Stacked UPDATE → users.admin0 → 10 (unchanged, HTTP 200 in 0.015s)

The only actor between baseline=0 and the verified=1 was the unauthenticated PoC request; the patched control rejected the stacked statement.

Files

docker-compose.yml        vulnerable 4.18.8 + patched 4.18.9 + MySQL 8
poc.py                    detection + stacked-UPDATE privesc (dry-run default)
validate-lab.sh           A/B validation battery (resets baseline, prints verdict)
craft/Dockerfile          PHP 8.2 + exact craftcms/cms pin (no dev deps)
craft/install.sh          unattended Craft install + sink template
craft/templates/search.html   sink: craft.users().search(request param)
craft/web/, craft/routes.php  minimal project bootstrap (scaffold 4.8.0 files)
init.sql                  two databases, one per Craft side

Attribution & references

  • Prior art: fixedbyreboot/CVE-2026-123488-POC (published 2026-11-06). This repo is an independent lab + re-implementation used to validate the claim A/B; payloads follow the documented injection pattern.
  • Vendor advisory: GHSA-qcvp-ggx3-97r6
  • Fix diff: craftcms/cms 4.18.8...4.18.9 (SearchQuery.php, Search.php, Element.php, StringHelper.php, Elements.php)
  • Affected range/CVSS: CVE-2026-123488 (CNA: VulnCheck)

Safety

Lab credentials are throwaway (admin/adminadmin, local-only MySQL). poc.py sends nothing unless you pass --target, and writes nothing unless you pass --exploit (--detect is timing-only). The stacked statement flips one flag. Do not run it against systems you do not own or are not authorized to test. Patch: upgrade to ≥ 4.18.9 / ≥ 5.11.2.

License

MIT — see LICENSE.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →