Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-31404

CVE-2025-31404: AF Tell a Friend CSRF Vulnerability

CVE-2025-31404 is a Cross-Site Request Forgery vulnerability in AF Tell a Friend plugin that enables Stored XSS attacks. This post covers technical details, affected versions through 1.4, impact assessment, and mitigation.

Published: April 22, 2026

CVE-2025-31404 Overview

CVE-2025-31404 is a Cross-Site Request Forgery (CSRF) vulnerability in the AF Tell a Friend WordPress plugin developed by Wladyslaw Madejczyk. This vulnerability allows attackers to leverage CSRF to inject Stored Cross-Site Scripting (XSS) payloads into the affected WordPress installation. The chained nature of this vulnerability (CSRF to Stored XSS) significantly increases its potential impact, as it enables persistent malicious script execution in the context of authenticated users.

Critical Impact

Attackers can exploit the CSRF vulnerability to inject persistent XSS payloads that execute in the browsers of all users who view the affected content, potentially leading to session hijacking, credential theft, or administrative account compromise.

Affected Products

  • AF Tell a Friend WordPress Plugin version 1.4 and earlier
  • WordPress installations using the af-tell-a-friend plugin
  • All versions from initial release through version 1.4

Discovery Timeline

  • 2025-04-09 - CVE-2025-31404 published to NVD
  • 2026-04-15 - Last updated in NVD database

Technical Details for CVE-2025-31404

Vulnerability Analysis

This vulnerability represents a compound attack chain combining two distinct vulnerability classes: Cross-Site Request Forgery (CSRF) and Stored Cross-Site Scripting (XSS). The AF Tell a Friend plugin fails to implement proper CSRF token validation on sensitive form submissions, allowing an attacker to craft malicious requests that are executed in the context of an authenticated administrator. Furthermore, the plugin does not properly sanitize or escape user-supplied input before storing and rendering it, enabling the injection of persistent JavaScript payloads.

The CSRF-to-XSS chain is particularly dangerous because it allows an unauthenticated attacker to inject persistent malicious content that will execute for every user who subsequently views the affected page, including administrators with elevated privileges.

Root Cause

The root cause of this vulnerability stems from two security deficiencies in the AF Tell a Friend plugin:

  1. Missing CSRF Protection: The plugin does not implement nonce verification or other anti-CSRF mechanisms on form submissions that modify plugin settings or content. This allows attackers to forge requests on behalf of authenticated users.

  2. Inadequate Input Sanitization: User-supplied data is not properly sanitized using WordPress security functions such as sanitize_text_field(), esc_html(), or wp_kses() before being stored in the database or rendered in HTML output.

Attack Vector

The attack follows a multi-stage exploitation process:

  1. Attacker Crafts Malicious Page: The attacker creates a web page containing a hidden form that submits to the vulnerable plugin endpoint with XSS payload data.

  2. Social Engineering: The attacker lures an authenticated WordPress administrator to visit the malicious page.

  3. Forged Request Execution: When the administrator visits the page, the hidden form automatically submits (via JavaScript), sending the XSS payload to the WordPress installation.

  4. Payload Storage: Due to missing input sanitization, the XSS payload is stored in the database.

  5. Persistent Execution: The malicious script executes whenever users view the affected content, enabling session hijacking, credential theft, or further attacks.

The attack can be executed without the victim's knowledge, as the form submission occurs automatically upon page load. Successful exploitation could allow an attacker to perform administrative actions, inject additional malicious content, or compromise user accounts.

Detection Methods for CVE-2025-31404

Indicators of Compromise

  • Unexpected JavaScript code or <script> tags appearing in plugin settings or stored content
  • Suspicious form submissions to the AF Tell a Friend plugin endpoints from external referrers
  • Browser console errors indicating blocked inline scripts (if Content Security Policy is enabled)
  • User reports of unexpected behavior or redirects when viewing pages containing the plugin

Detection Strategies

  • Monitor web server access logs for POST requests to AF Tell a Friend plugin endpoints with suspicious payloads containing HTML or JavaScript
  • Implement Web Application Firewall (WAF) rules to detect and block XSS patterns in request parameters
  • Scan WordPress database tables for stored XSS indicators such as <script>, javascript:, or event handlers like onerror
  • Use WordPress security plugins to audit plugin settings for unauthorized modifications

Monitoring Recommendations

  • Enable WordPress audit logging to track all plugin configuration changes and content modifications
  • Configure SentinelOne Singularity to monitor for suspicious JavaScript execution patterns originating from WordPress installations
  • Implement Content Security Policy (CSP) headers to mitigate XSS impact and generate violation reports
  • Regularly review stored content in database tables associated with the AF Tell a Friend plugin

How to Mitigate CVE-2025-31404

Immediate Actions Required

  • Immediately deactivate and remove the AF Tell a Friend plugin (af-tell-a-friend) if version 1.4 or earlier is installed
  • Audit WordPress database for any signs of stored XSS payloads that may have been injected
  • Review WordPress user accounts for any unauthorized administrative accounts or privilege changes
  • Clear browser caches for administrators who may have interacted with affected pages

Patch Information

As of the published vulnerability data, all versions of AF Tell a Friend through version 1.4 are affected. Site administrators should check the Patchstack WordPress Vulnerability Analysis for the latest information on available patches or updates. If no patched version is available, consider replacing the plugin with a secure alternative that provides similar functionality.

Workarounds

  • Remove or deactivate the AF Tell a Friend plugin until a security patch is released by the vendor
  • Implement Content Security Policy (CSP) headers to restrict inline script execution and mitigate XSS impact
  • Deploy a Web Application Firewall (WAF) with rules to block CSRF and XSS attack patterns
  • Restrict access to WordPress administrative interfaces using IP whitelisting or VPN requirements
  • Enable HTTP-only and Secure flags on all session cookies to reduce session hijacking risk
bash
# WordPress configuration to help mitigate XSS impact
# Add to wp-config.php or server configuration

# Force secure cookies (add to wp-config.php)
define('FORCE_SSL_ADMIN', true);
define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');

# Apache .htaccess CSP header example
# <IfModule mod_headers.c>
#   Header set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline';"
# </IfModule>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeCSRF

  • Vendor/TechAf Tell A Friend

  • SeverityNONE

  • CVSS ScoreN/A

  • EPSS Probability0.05%

  • Known ExploitedNo
  • Impact Assessment
  • ConfidentialityNone
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-352
  • Technical References
  • Patchstack WordPress Vulnerability Analysis
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English