CVE-2026-24995

Latest Post Shortcode <= 14.2.0 - Missing Authorization

mediumMissing Authorization
4.3
CVSS Score
4.3
CVSS Score
medium
Severity
14.2.1
Patched in
10d
Time to patch

Description

The Latest Post Shortcode plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in all versions up to, and including, 14.2.0. This makes it possible for authenticated attackers, with Subscriber-level access and above, to perform an unauthorized action.

CVSS Vector Breakdown

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

Technical Details

Affected versions<=14.2.0
PublishedJanuary 24, 2026
Last updatedFebruary 2, 2026
Affected pluginlatest-post-shortcode

Source Code

WordPress.org SVN
Research Plan
Unverified

# Exploitation Research Plan - CVE-2026-24995 ## 1. Vulnerability Summary The **Latest Post Shortcode** plugin (versions <= 14.2.0) contains a missing authorization vulnerability within its AJAX handler functions. While these functions are registered for authenticated users via `wp_ajax_`, they fai…

Show full research plan

Exploitation Research Plan - CVE-2026-24995

1. Vulnerability Summary

The Latest Post Shortcode plugin (versions <= 14.2.0) contains a missing authorization vulnerability within its AJAX handler functions. While these functions are registered for authenticated users via wp_ajax_, they fail to implement necessary capability checks (e.g., current_user_can( 'manage_options' )). This allows any authenticated user, including those with Subscriber-level permissions, to invoke administrative or restricted functionality.

2. Attack Vector Analysis

  • Endpoint: /wp-admin/admin-ajax.php
  • Authentication: Subscriber-level access or higher is required.
  • Vulnerable Action: To be confirmed via discovery, but likely related to settings updates or metadata manipulation. Common candidates in this plugin type are lps_save_settings, lps_update_options, or latest_post_shortcode_preview.
  • Payload: Parameters passed via POST to the identified AJAX action.
  • Preconditions: The attacker must have a valid session cookie for a Subscriber user.

3. Code Flow (Inferred)

  1. Entry Point: An AJAX hook is registered: add_action( 'wp_ajax_ACTION_NAME', 'FUNCTION_NAME' );.
  2. Missing Check: The callback FUNCTION_NAME is invoked. It likely checks a nonce using check_ajax_referer (providing CSRF protection) but fails to call current_user_can().
  3. Execution: The function performs a privileged action, such as update_option() or modifying post data, based on the $_POST input.

4. Nonce Acquisition Strategy

The plugin likely uses wp_localize_script to provide an AJAX nonce to the frontend.

  1. Shortcode Identification: Search the plugin code for add_shortcode. The primary shortcode is likely [latest-post-shortcode].
  2. Page Creation: Create a post containing the shortcode to ensure scripts are enqueued:
    wp post create --post_type=page --post_status=publish --post_title="Nonce Page" --post_content='[latest-post-shortcode]'
    
  3. Localization Search: Use grep to find the localization key:
    grep -rn "wp_localize_script" /var/www/html/wp-content/plugins/latest-post-shortcode/
    
  4. Extraction:
    • Use browser_navigate to the "Nonce Page".
    • Use browser_eval to extract the nonce:
      // Example based on common naming patterns
      window.lps_vars?.nonce || window.lps_ajax?.nonce
      

5. Exploitation Strategy

Phase 1: Discovery

Search the plugin directory to find AJAX actions lacking capability checks:

grep -rn "add_action.*wp_ajax_" /var/www/html/wp-content/plugins/latest-post-shortcode/

Once actions are found (e.g., lps_save_settings), examine the callback function for current_user_can.

Phase 2: Payload Delivery

Assuming an action named lps_save_settings (inferred) exists:

  1. Target: /wp-admin/admin-ajax.php
  2. Method: POST
  3. Headers: Content-Type: application/x-www-form-urlencoded
  4. Body:
    action=lps_save_settings&security=[NONCE]&settings[some_option]=attacker_value
    

6. Test Data Setup

  1. Target Plugin: Ensure latest-post-shortcode v14.2.0 is installed and active.
  2. Attacker User:
    wp user create attacker attacker@example.com --role=subscriber --user_pass=password
    
  3. Victim Content: (Optional) Create some posts for the shortcode to display.
    wp post create --post_type=post --post_title="Secret Post" --post_status=publish
    

7. Expected Results

  • Success: The server returns a 200 OK or a JSON success response (e.g., {"success":true}).
  • Impact: Settings are modified, or data is manipulated despite the user only having Subscriber permissions.

8. Verification Steps

  1. Check Options: Use WP-CLI to verify if the plugin settings were altered:
    wp option get lps_settings
    
  2. Check Behavior: If the exploit changed a display setting (e.g., custom CSS or HTML), verify the change on the frontend.

9. Alternative Approaches

If the vulnerability is not in settings:

  • Metadata Manipulation: Look for AJAX actions that call update_post_meta.
  • Information Disclosure: Check if any AJAX actions leak post content or system information that should be restricted to admins.
  • Shortcode Injection: If the AJAX action allows updating the shortcode attributes globally, try injecting malicious attributes that might lead to XSS.

Note on Identifiers: Since source was not provided, the agent MUST prioritize grep -rn "wp_ajax_" to find the exact action names (lps_... or latest_post_...) and the corresponding nonce keys in the source before attempting exploitation.

Research Findings
Static analysis — not yet PoC-verified

Summary

The Latest Post Shortcode plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on an AJAX handler function in versions up to, and including, 14.2.0. This allows authenticated attackers with Subscriber-level permissions to perform administrative actions, such as modifying plugin settings, by bypassing the intended authorization logic.

Exploit Outline

To exploit this vulnerability, an attacker with Subscriber-level credentials first retrieves a valid AJAX security nonce, which is typically exposed in the frontend HTML via localized scripts (e.g., variables associated with the [latest-post-shortcode] shortcode). The attacker then sends a POST request to `/wp-admin/admin-ajax.php` using the vulnerable AJAX action. Because the server-side callback function only validates the nonce and fails to perform a capability check (such as current_user_can('manage_options')), the attacker can successfully execute privileged tasks, such as updating plugin configurations or manipulating metadata, by providing the appropriate parameters in the request body.

Check if your site is affected.

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