Executive brief
Ninja Forms is a popular WordPress form-building plugin used to create contact forms and surveys on websites. A vulnerability in versions 3.14.10 through 3.15.1 allows unauthenticated visitors to execute any shortcode registered on the site by injecting malicious code through HTTP headers (like Client-IP or Referer), potentially enabling attackers to access sensitive data, modify site content, or inject malware without requiring authentication or admin privileges.
Technical details
This is a server-side template injection / code execution vulnerability in the Ninja Forms plugin's merge-tag substitution logic. When administrators configure form success messages or field default values to include request-derived merge tags (such as {other:user_ip}, {system:ip}, or {other:referer_url}), the plugin substitutes these values from HTTP request headers without sanitization, then processes the resulting content for shortcode execution. An unauthenticated attacker can inject a shortcode payload (e.g., [gallery]) via HTTP headers, which gets substituted into the message/field and then executed as a registered WordPress shortcode. Exploitation requires only that the administrator has configured one of the affected merge tags in a success message or default value; no authentication, nonce validation, or user interaction is required beyond a normal form submission or page load. The vulnerability was partially patched in 3.15.1 but remained exploitable through alternate merge-tag sources until the full fix in 3.15.2.
Affected products
- WP Ninjas Ninja Forms 3.14.10 through 3.15.1
Timeline
- 2026-09-04: disclosed
- 2026-09-06: patched: Fixed in version 3.15.2