Reflected XSS in "Cost Tracker" Notes Field
The Notes field in the Cost Tracker module reflects user input without sanitisation or encoding, so JavaScript entered there executes when the form is saved. An attacker with dashboard access could run script in their own session, but the text does not show exploitation against other users.
- Triaged in 5 hours
- Fixed in 3 days
- Paid in 3 days
- Disclosed after 37 days
Another reflected Cross-Site Scripting (XSS) vulnerability exists in the "Notes" input field under the Cost Tracker section of MainWP (Version 5.4.0.11). When adding or editing a Cost from the "Cost Tracker" module in the client management panel, a user can enter arbitrary input into the Notes field. If this input includes malicious JavaScript (e.g., an XSS payload), it is reflected back and executed immediately upon saving, due to the lack of proper input sanitization and output encoding. The script is not stored permanently in the system, which confirms it as a reflected XSS, triggered right after submission in the current session.
Impact
The presence of such a vulnerability indicates that user input is not properly sanitized or encoded before being reflected back into the HTML response. While not directly exploitable by other users, this flaw can have the following implications:
- It highlights a potential entry point for more severe XSS vulnerabilities if similar input handling exists elsewhere in the application.
- It poses a client-side security risk, especially in environments with browser extensions, debugging tools, or when integrating third-party scripts.
- It reduces trust in the platform’s secure coding practices, especially in an admin interface that manages multiple WordPress sites.
- It can be used by attackers with access to the dashboard (e.g., insider threat or compromised low-privilege user) to test or explore further payload injection points. Addressing such vulnerabilities improves the overall resilience of the application and helps prevent future, more impactful exploits.
Attachments
Context
MainWP is a WordPress management platform, and the report concerns its "Cost Tracker" module inside the client management panel. Cost Tracker lets an operator record costs against a client, and each cost entry has a Notes field for free text. The vulnerable asset named in the report is the MainWP source repository on GitHub, and the version tested was 5.4.0.11.
The bug is a reflected cross-site scripting issue in that Notes field. The researcher's summary is that arbitrary input entered into Notes is reflected back and executed immediately on saving, because the value is neither properly sanitised on input nor encoded on output. The script is not stored permanently, which is why the report classifies it as reflected rather than stored, triggered right after submission in the current session.
Setup
The report gives few environmental details. What it does state is the product and version (MainWP [redacted]), the location of the feature (the Cost Tracker module in the client management panel), and the action required (adding or editing a cost). The researcher describes the actor as a user with access to the dashboard, and in the impact section refers to a compromised low-privilege user or an insider as the realistic source of the input. No specific role name, account configuration, browser or interception tool is named.
Finding it
The observation is straightforward: the Notes field accepts arbitrary input, and whatever is entered is reflected into the HTML response when the cost is saved. Because the reflection is not encoded, a JavaScript payload placed in Notes executes at that moment. The researcher notes that the value does not persist in the system, which is the basis for calling it reflected XSS rather than stored: the execution happens right after submission, in the current session.
Exploitation
Step 1: Open the Cost Tracker module
In the client management panel, go to the Cost Tracker section and start adding a new cost, or edit an existing one. This is the form that contains the Notes input field.
Step 2: Enter a payload in Notes
The Notes field accepts arbitrary input. The report describes the input as malicious JavaScript, an XSS payload, but does not reproduce the exact payload string used.
Step 3: Save the cost
On saving, the value from Notes is reflected back into the HTML response without proper sanitisation or output encoding, and the script executes immediately in the current session. The report does not include the raw request or response for this step.
Step 4: Confirm it is reflected, not stored
The script is not stored permanently in the system, so the trigger is the submission itself, which confirms the reflected classification. The trigger is the submission itself, which confirms the reflected classification.
Root cause
The report attributes the issue to missing input sanitisation and missing output encoding: user input is reflected back into the HTML response without being made safe. Both defences that should have applied, validation of what is accepted into Notes and encoding of what is written back into the page, were absent for this field. The report does not identify the specific function or template responsible, so the exact code path is not established here.
Impact
The researcher is explicit that the flaw is not directly exploitable by other users. The practical implications given are:
- It marks a potential entry point for more severe XSS if similar input handling exists elsewhere in the application.
- It is a client-side risk, particularly in environments with browser extensions, debugging tools, or third-party scripts integrated into the page.
- It undermines confidence in the platform's secure coding practices, which matters for an admin interface that manages multiple WordPress sites.
- An attacker with access to the dashboard, such as an insider or someone using a compromised low-privilege account, could use it to test or explore further payload injection points.
The platform recorded the issue as low severity with a CVSS score of 2.2 and a bounty of 50.00 USD, which is consistent with the self-XSS-like precondition of dashboard access described above.
Fix
The report does not describe a patch or a code change. The remediation it argues for follows from the root cause: sanitise the Notes input and encode it on output so that reflected content cannot execute as script. The report frames this as improving overall resilience and preventing future, more impactful exploits rather than as a specific commit.
Variants to test
- A positive result is script execution on save without a reload.
- A positive result is execution in either path where the other is safe.
- A positive result is execution from a context-specific payload.
- A positive result is execution in the confirmation view.
Hunting notes
Attachments
The attachment is a screen recording named Cost_Tracker_Notes_XSS.mp4, showing the Notes field behaviour described above.
What happened, in plain words
MainWP is a tool that lets one person manage many WordPress websites from a single dashboard. Think of it like a control panel for a fleet of websites, so you do not have to log in to each site separately. One of its features is called Cost Tracker, which lets the operator write down costs for a client, for example what a project or a service cost. Every cost entry has a free-text box called Notes, where you can type anything you like.
The report describes a problem in that Notes box. When someone types text into it and saves the cost, the text is sent back to the browser and shown on the page. If the text contains JavaScript, which is the programming language that browsers run to make pages interactive, the browser runs that JavaScript too. The report calls this a reflected cross-site scripting (XSS) vulnerability. The word reflected means the dangerous text bounces straight back to the page in the same moment you submit it, rather than being saved and shown again later. The report says the script is not stored permanently, which is why it is reflected and not stored.
The version tested was MainWP 5.4.0.11. The report was filed on HackerOne against the MainWP program, the researcher is rishail01, and the platform recorded it as low severity with a CVSS score of 2.2 and a bounty of 50.00 USD. It was disclosed on 2025-07-17. The asset named in the report is the MainWP source repository on GitHub.
Background you need first
What a dashboard and a client management panel are
A dashboard is the logged-in area of a web application where you see menus, forms and data. A client management panel is the part of that dashboard where you keep records about each client. In MainWP, this is where an operator manages the WordPress sites belonging to different clients.
What the Cost Tracker module does
The Cost Tracker is a small feature inside that panel. You add a cost entry for a client, and each entry has a Notes field for free text. A module here just means a self-contained piece of the product with its own screens and forms.
What a form field is
When you see a box on a web page where you can type, that box is a form field. When you press a save button, the browser sends whatever you typed to the server, the computer that runs the website. The server then usually sends a new page back, and that page may include the text you typed so you can see it again.
What sanitising and encoding mean
Sanitising means cleaning input: checking what a user typed and removing or rejecting anything dangerous before it is used. Encoding means changing special characters into a safe form before putting them into a page, so the browser shows them as text instead of treating them as instructions. A simple comparison: if a form asks for your name and you write a rude word, sanitising is the clerk refusing to accept it, and encoding is the clerk writing it on a form in a way that nobody can mistake for an official instruction.
What reflected XSS is
Cross-site scripting, usually shortened to XSS, is a class of bug where an attacker gets their own JavaScript to run inside someone else's browser session on a website. Reflected XSS is the variety where the malicious text is sent in a request and immediately echoed back in the response, so it runs once, right then. Stored XSS is the variety where the malicious text is saved on the server and runs every time the page is loaded. The difference matters because stored XSS can hit many people over time, while reflected XSS usually only affects the person who sent the request.
What a session is
A session is the period during which a website remembers that you are logged in. The browser holds a small piece of data, often a cookie, that identifies your session to the server. When the report says the script executes in the current session, it means it runs in the browser of the person who is logged in and doing the saving at that moment.
Setup
The report gives few details about the environment. What it does state is the product and version, MainWP [redacted], the location of the feature, the Cost Tracker module in the client management panel, and the action required, adding or editing a cost. The researcher describes the actor as a user with access to the dashboard, and in the impact section refers to a compromised low-privilege user or an insider as the realistic source of the input. No specific role name, account configuration, browser or interception tool is named.
Finding it
The observation is straightforward. The Notes field accepts arbitrary input, and whatever is entered is reflected into the HTML response when the cost is saved. HTML is the language in which web pages are written, and a response is what the server sends back to the browser. Because the reflection is not encoded, a JavaScript payload placed in Notes executes at that moment. A payload here simply means the piece of text that is meant to be interpreted as code. The researcher notes that the value does not persist in the system, which is the basis for calling it reflected XSS rather than stored: the execution happens right after submission, in the current session.
Exploitation
Step 1: Open the Cost Tracker module
In the client management panel, go to the Cost Tracker section and start adding a new cost, or edit an existing one. This is the form that contains the Notes input field. The reason for this step is simply to reach the exact screen that holds the field under test.
Step 2: Enter a payload in Notes
The Notes field accepts arbitrary input. The report describes the input as malicious JavaScript, an XSS payload, but does not reproduce the exact payload string used. So there is no code block to show for this step: the report does not give the string that was typed.
Step 3: Save the cost
On saving, the value from Notes is reflected back into the HTML response without proper sanitisation or output encoding, and the script executes immediately in the current session. The report does not include the raw request or response for this step, so there is no HTTP exchange to reproduce here. The reason this step matters is that saving is the trigger: it is the moment the server builds a new page containing your text and sends it back.
Step 4: Confirm it is reflected, not stored
The script is not stored permanently in the system, so the trigger is the submission itself, which confirms the reflected classification. The trigger is the submission itself, which confirms the reflected classification. This step exists to tell the two kinds of XSS apart: if the script ran again on reload, it would have been saved on the server, and the report would have described stored XSS instead.
Root cause
The report attributes the issue to missing input sanitisation and missing output encoding: user input is reflected back into the HTML response without being made safe. Both defences that should have applied, validation of what is accepted into Notes and encoding of what is written back into the page, were absent for this field. The report does not identify the specific function or template responsible, so the exact code path is not established here.
Impact
The researcher is explicit that the flaw is not directly exploitable by other users. In other words, one person cannot use it to attack a different person's browser through this field. The practical implications given are:
- It marks a potential entry point for more severe XSS if similar input handling exists elsewhere in the application.
- It is a client-side risk, particularly in environments with browser extensions, debugging tools, or third-party scripts integrated into the page. Client-side means everything that happens inside the browser rather than on the server.
- It undermines confidence in the platform's secure coding practices, which matters for an admin interface that manages multiple WordPress sites.
- An attacker with access to the dashboard, such as an insider or someone using a compromised low-privilege account, could use it to test or explore further payload injection points. An insider is someone already trusted with access, and a low-privilege account is one with only limited permissions.
The platform recorded the issue as low severity with a CVSS score of 2.2 and a bounty of 50.00 USD. CVSS is a standard scoring system for how serious a vulnerability is, and a low score fits the precondition described above: you already need to be logged in to the dashboard to trigger it.
Fix
The report does not describe a patch or a code change. The remediation it argues for follows from the root cause: sanitise the Notes input and encode it on output so that reflected content cannot execute as script. The report frames this as improving overall resilience and preventing future, more impactful exploits rather than as a specific commit.
Variants to test
These are other places worth checking, in the same spirit as the original finding:
- A positive result is script execution on save without a reload.
- A template is the reusable piece of page markup the server fills in with your data. A positive result is execution in either path where the other is safe.
- An attribute is a setting written inside an HTML tag, and a JavaScript context is a place in the page where code is expected, so the same text behaves differently depending on where it lands. A positive result is execution from a context-specific payload.
- A positive result is execution in the confirmation view.
Hunting notes
CRUD stands for create, read, update and delete, the four basic operations of a data entry screen. POST is the HTTP method a browser uses to send form data to a server.
Attachments
The attachment is a screen recording named Cost_Tracker_Notes_XSS.mp4, showing the Notes field behaviour described above.
Glossary
- MainWP: a WordPress management platform that lets one operator manage many WordPress sites from a single dashboard.
- WordPress: a popular system for building and running websites.
- Cost Tracker: a MainWP module for recording costs against a client, with a free-text Notes field on each entry.
- Client management panel: the part of the dashboard where records about each client are kept.
- Module: a self-contained feature of a larger product, with its own screens and forms.
- Form field: a box on a web page where a user can type, whose contents are sent to the server on submit.
- Server: the computer that runs a website and answers requests from browsers.
- Browser: the program on your computer that displays web pages and runs their JavaScript.
- HTML: the language web pages are written in; the server sends it as a response and the browser renders it.
- Response: what the server sends back to the browser after a request.
- Request: what the browser sends to the server, for example the contents of a form when you press save.
- POST: the HTTP method a browser uses to send form data to a server.
- JavaScript: the programming language browsers run to make pages interactive; if an attacker's JavaScript runs in your session, that is XSS.
- XSS (cross-site scripting): a class of bug where an attacker's JavaScript runs inside someone else's browser session on a website.
- Reflected XSS: XSS where the malicious text is echoed straight back in the response to a request and runs once, immediately.
- Stored XSS: XSS where the malicious text is saved on the server and runs every time the affected page is loaded.
- Payload: the piece of text crafted to be interpreted as code by the browser.
- Sanitising: cleaning user input by removing or rejecting anything dangerous before it is used.
- Encoding: converting special characters into a safe form before placing them in a page, so they display as text rather than acting as instructions.
- Session: the period during which a site remembers you are logged in, usually tracked with a cookie.
- Cookie: a small piece of data the browser stores for a site and sends back with requests, often used to identify a session.
- Client-side: happening inside the browser rather than on the server.
- Admin interface: the logged-in area used to manage a system, as opposed to the public-facing site.
- Insider: someone already trusted with access to the system.
- Low-privilege account: an account with only limited permissions.
- CVSS: a standard scoring system for rating the severity of a vulnerability.
- Bounty: a payment a program gives a researcher for a valid vulnerability report.
- HackerOne: a platform where security researchers report vulnerabilities to organisations.
- Template: a reusable piece of page markup that the server fills in with data before sending it.
- Attribute: a setting written inside an HTML tag, such as a link target or an input type.
- JavaScript context: a place in a page where code is expected, so text placed there is treated as code.
- CRUD: create, read, update and delete, the four basic operations of a data entry screen.
- Recon: the early exploration of a target to find where to look for bugs.
- Echoed back: sent back to the browser inside the response page, so the user sees their own input again.