s2Member WordPress Plugin PayPal IPN Template-Injection RCE (CVE-2026-86596)
Published: 2026-11-25 • Researcher: Aureels (Aureel) — PoC author and repository owner; Wordfence — vulnerability report and CVSS scoring; s2Member / WebSharks — vendor
- Severity
- Critical
- CVE
- CVE-2026-86596 (Wordfence advisory bbe64cd3-c5ca-4867-90de-4784510a1126)
- Category
- web
- Affected product
- s2Member (s2Member Framework / s2Member Pro) WordPress plugin — PayPal IPN notification handler and email-template rendering
- Affected versions
- All versions up to and including 260927 (NVD); fixed in 261001. The PoC's internal version gate labels 251002 through 260927 as vulnerable
- Disclosed
- 2026-11-25
- Patch status
- Patched
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-86596
- https://www.wordfence.com/threat-intel/vulnerabilities/id/bbe64cd3-c5ca-4867-90de-4784510a1126
- https://github.com/Aureels/CVE-2026-86596
- https://plugins.trac.wordpress.org/changeset/3722434/s2member
- https://plugins.trac.wordpress.org/browser/s2member/tags/260829/src/includes/classes/paypal-notify-in-web-accept-sp.inc.php#L104
- https://plugins.trac.wordpress.org/browser/s2member/tags/260829/src/includes/classes/utilities.inc.php#L49
- https://github.com/thiscitze/cve-2026-86596-poc
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-11-04 |
| Author / Researcher | Aureels (Aureel) — PoC author and repository owner; Wordfence — vulnerability report and CVSS scoring; s2Member / WebSharks — vendor |
| CVE / Advisory | CVE-2026-86596 (Wordfence advisory bbe64cd3-c5ca-4867-90de-4784510a1126) |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (CVSS 3.1, AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) |
| Status | Weaponized |
| Tags | RCE, WordPress, s2Member, plugin, PayPal-IPN, PHP, template-injection, CWE-94, webshell |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | s2Member (s2Member Framework / s2Member Pro) WordPress plugin — PayPal IPN notification handler and email-template rendering |
| Versions Affected | All versions up to and including 260927 (NVD); fixed in 261001. The PoC’s internal version gate labels 251002 through 260927 as vulnerable |
| Language / Platform | PHP (WordPress plugin); the PoC client is Python 3 and runs on any OS |
| Authentication Required | Yes — NVD describes authenticated attackers with custom-level access and above; live exploitation additionally needs a valid PayPal IPN verification path or the s2Member proxy verification key |
| Network Access Required | Yes |
Summary
The s2Member plugin for WordPress does not properly sanitize the PayPal IPN item name parameter before interpolating it into an email template, so a crafted value hides a PHP opening tag behind a placeholder that the later placeholder-cleanup pass reassembles into valid PHP. NVD records remote code execution in all versions up to and including 260927, fixed in 261001, and scores it 9.8 critical with a network vector. The Aureels single-file PoC drives the s2Member PayPal notify endpoint with a bypass matrix covering payload encoding, request encoding, evasion headers and TLS fingerprints, and can run a command, write a test file or deploy a persistent webshell. NVD describes the attacker as authenticated with custom-level access and above, while the PoC treats a valid PayPal IPN verification path or proxy verification key as the gate.
Vulnerability Details
Root Cause
s2Member receives a PayPal IPN notification and interpolates the payer-supplied item_name into a message template. Before interpolation the plugin runs strip_php_tags_deep(), which recursively HTML-unescapes and URL-decodes the value but then only replaces the literal two-character sequence <?; esc_refs() escapes only backslashes and dollar signs. After interpolation the template is cleaned with preg_replace('/%%(.+?)%%/i', '', $msg), which deletes any %%name%% placeholder left in the text. A value such as <%%x%%?php ... ?> therefore passes the strip (it contains no literal <?), and when %%x%% is removed the remaining characters reassemble into <?php inside the same message body. The template is later evaluated through do_shortcode() / [s2If php="..."], so the injected PHP is executed (CWE-94, per the worklist).
Attack Vector
A forged PayPal IPN notification is POSTed to the site’s IPN endpoint (/?s2member_paypal_notify=1) with txn_type=web_accept and payment_status=Completed. The malicious PHP is placed in item_name, and a valid item_number for a protected post or page is supplied so that s2Member processes the transaction. Because the plugin validates the notification with PayPal, a sandbox IPN or the s2member_paypal_proxy_verification key is needed for the payload to reach the template. The PoC iterates ten payload encodings, five request encodings (form, multipart, duplicated item_name, multipart duplicate, JSON), seven header sets (X-Forwarded-For, PayPal referer/origin, IPN headers) and four TLS fingerprints (curl_cffi).
Impact
Arbitrary PHP code execution in the context of the WordPress/PHP user. The PoC can run an arbitrary shell command, write a marker file into ABSPATH, the content directory, uploads, the current directory or the temp directory, or deploy a password-protected webshell (default shell.php?pass=cmd) that survives the request. A compromised WordPress instance exposes its database credentials, user sessions, uploaded content and any file readable by the web user, and is a common pivot to the host.
Environment / Lab Setup
OS: Linux (Docker host or VM)
Target: WordPress with s2Member <= 260927, PayPal IPN notifications enabled,
an email template containing the item_name placeholder and a
do_shortcode() / [s2If php=...] sink, reachable at
http://127.0.0.1:8080
Attacker: Python 3.8+ (standard library only; curl_cffi optional for
TLS impersonation)
Tools: curl, Burp Suite, optional PayPal sandbox account or an s2Member
proxy verification key for IPN validationSetup Steps
| |
Proof of Concept
Step-by-Step Reproduction
- Recon — the PoC reads
/wp-content/plugins/s2member/readme.txtands2member.php(plus the Pro variants) for a version string, probes the home page for a WAF challenge, and harvestsitem_numbervalues from the page HTML (falling back to1). - Version gate —
vlabel()marks a targetVULNfor versions 251002 through 260927,PATCHfor 261001 and above; a target already at or above 261001 is not attacked. - Deliver the payload — a forged IPN notification is POSTed to
/?s2member_paypal_notify=1withitem_nameset to the template-injection payload, iterating the payload, request, header and TLS variants until the WAF/blocked categories no longer match. - Confirm — a response containing the marker (
CVE_2026_86596_) counts as a hit; in--write-testmode the PoC fetches the written file back from several likely paths; in--deploy-shellmode it requests the shell with a test command. - Optional persistence —
--cmd "shell:SECRET" --deploy-shellwritesshell.phpand prints the URL to use with?SECRET=command.
Exploit Code
See
poc.pyfor the full implementation (recon, bypass matrix, scanner, webshell deployment) andupstream-README.mdfor the upstream usage table.
The essential request shape is:
| |
Expected Output
| |
Command output appears wherever s2Member renders the evaluated template (the notification email body); the PoC itself does not capture or parse that output.
Detection & Indicators of Compromise
- POST requests to
/?s2member_paypal_notify=1carrying<%%,%%x%%,<?php,system(,base64_decode(or similar sequences initem_name. - IPN-shaped requests (
txn_type=web_accept,payment_status=Completed) from IPs that are not PayPal, especially withX-Forwarded-For: 127.0.0.1, a PayPal referer/origin, or a spoofedUser-Agent. - Duplicate
item_nameparameters, JSON or multipart bodies posted to the IPN endpoint, and rapid rotation of client TLS fingerprints against one site. - New PHP files under
wp-content/uploads/or the web root (cve_test.php,scan_*.php,shell.php), followed by GET requests to them with a password query parameter. - PHP errors or template output containing an unexpected
<?phpopener, and mail logs with PHP code in the rendered notification body. - Audit-log entries showing custom-level account activity immediately before IPN notifications.
Example access-log signature:
| |
SIEM / IDS rule (example):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade s2Member (Framework and Pro) to 261001 or later and confirm the plugin files on disk were replaced; the vendor fix is changeset 3722434. |
| Workaround | Until patched, disable PayPal IPN notifications / the s2Member PayPal integration, and remove PHP evaluation from notification email templates (do_shortcode(), [s2If php="..."]). Restrict and review all custom-level and above accounts. |
| Config Hardening | Add a WAF rule rejecting <%% and <? sequences in IPN parameters, keep PHP execution disabled in wp-content/uploads, run the web user with least privilege, and monitor the web root with file-integrity checks. |
References
- CVE-2026-86596 — NVD
- Wordfence threat intel — CVE-2026-86596
- Aureels/CVE-2026-86596 — source PoC
- s2Member changeset 3722434 (vendor fix)
- s2Member 260829 — paypal-notify-in-web-accept-sp.inc.php (sink)
- s2Member 260829 — utilities.inc.php (strip helper)
- thiscitze/cve-2026-86596-poc — alternate PoC referenced upstream
Notes
Auto-ingested from https://github.com/Aureels/CVE-2026-86596 on 2026-11-25.
Review verdict: this is a real exploit, not a detector. The repository’s single file implements the full template-injection chain (recon, version gate, ten payload variants, five request encodings, evasion headers, TLS impersonation, command execution, file-write verification and webshell deployment). It also exposes a mass-scan mode, but exploit code is the core of the tool, so it was ingested rather than skipped. The scanner is inseparable from the exploit and is documented as such.
License: MIT, copyright (c) 2026 Aureel. The LICENSE file is included and the exploit file carries the archive disclaimer header. Archived for authorized security research only.
Limitations and caveats:
- No lab, docker-compose file or vulnerable plugin copy is shipped; a test harness must be built from WordPress plus s2Member <= 260927.
- The PoC was not executed during ingestion (archive policy), so its success against a live target was not independently reproduced here.
- Live exploitation needs a valid
item_number, PayPal IPN validation (sandbox or proxy verification key) and a template that evaluates PHP; without those the payload never reaches the sink. - Command-mode success detection is heuristic: it looks for the
CVE_2026_86596_marker (or a caller-supplied marker) in the response and does not parse command output.--write-testand--deploy-shellhave concrete verification steps and are more reliable for confirming code execution. - Version data: NVD’s record is marked Deferred and carries no CPE configurations (the worklist’s product and version-range lists are empty), so the affected range comes from the advisory text (up to and including 260927, fixed in 261001) and the PoC’s internal gate (251002 minimum). NVD’s description says authenticated attackers with custom-level access and above, while the Wordfence CVSS vector is PR:N; both are reported above rather than resolved.
| |