Skip to content
XSS Disclosed report Beginner

XSS and HTML Injection on the pressable.com search box

The search box on pressable.com reflected user input without proper encoding, allowing an attacker to inject HTML or JavaScript. An attacker could use a crafted link to run script in a victim's browser or redirect them to a malicious site.

sawrav-chowdhury Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 5 days
  • Paid in 8 days
  • Disclosed after 4 months

Summary:

Hi, I have found that search box on pressable.com is vulnerable for XSS attack and HTML Injection .

Steps To Reproduce:

  1. Visit https://pressable.com/knowledgebase/
  2. Put the payload on the search box.

XSS Payload: "><img src=x onerror=javascript:alert(document.cookie)>

HTML Injection Payload: <h1><font Color=red>Visit Our New WebSite </h1><h3><mark><a href="https://example.com">e x a m p l e . c o m </a></mark></h3>

3.XSS will be triggered /HTML Injection will be reflected.

Link with XSS Payload: https://pressable.com/?s=%22%3E%3Cimg+src%3Dx+onerror%3Djavascript%3Aalert%28document.cookie%29%3E&post_type=knowledgebase

Link with HTML Injection Payload: https://pressable.com/?s=%3Ch1%3E%3Cfont+Color%3Dred%3EVisit++Our++New++WebSite+%3C%2Fh1%3E%3Ch3%3E%3Cmark%3E%3Ca+href%3D%22https%3A%2F%2Fexample.com%22%3Ee+x+a+m+p+l+e+.+c+o+m+%3C%2Fa%3E%3C%2Fmark%3E%3C%2Fh3%3E&post_type=knowledgebase

Supporting Material/References:

POC Video Attached

Impact

Due to these vulnerabilities, attacker can easily divert victims to their malicious site and able to get credentials of victims.

Attachments

POC-_VIDEO.mp4 From the original on HackerOne

The original report as published on HackerOne, by sawrav-chowdhury. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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. 4 min read.

Context

Pressable is a managed WordPress hosting product. The report concerns the public marketing site at pressable.com, and specifically its knowledge base search. The knowledge base lives at https://pressable.com/knowledgebase/, and the payload links in the report use the site root with the s parameter and post_type=knowledgebase.

The researcher reports that both script execution (XSS) and arbitrary HTML (HTML injection) are possible through the search box. The report is filed against the Automattic program on HackerOne, with the weakness classified as stored cross-site scripting and a medium severity. The asset named in the platform record is my.pressable.com, while the reproduction steps and payload URLs in the report itself point at the public pressable.com site.

Setup

No accounts, roles or special tooling are described. The reproduction only needs a browser and access to the public site. The preconditions are simply that the knowledge base search page is reachable and that the search term is reflected into the response.

Finding it

The researcher reports that the search box on pressable.com is vulnerable to XSS and HTML injection. The signal is the reflected search term: the payloads submitted in the search box come back in the results page, where the XSS triggers and the HTML injection is reflected.

Exploitation

Step 1: Open the knowledge base search

Visit the knowledge base page and use its search box:

Text
https://pressable.com/knowledgebase/

This is the normal entry point for the feature. The search box on this page is the input that ends up in the vulnerable reflection.

Step 2: Submit the XSS payload

Put the following payload into the search box:

HTML
"><img src=x onerror=javascript:alert(document.cookie)>

The payload starts with ">. It then injects an img element whose src is the non-existent value x, so the image fails to load. The onerror handler fires on that failure and runs javascript:alert(document.cookie), which displays the visitor's cookies for the current site in an alert box. The payload demonstrates that the XSS is triggered.

The equivalent request is given as a link:

The s parameter carries the URL-encoded payload, with post_type=knowledgebase alongside it. When the page is loaded, the XSS is triggered.

Step 3: Submit the HTML injection payload

For the HTML injection variant, the payload placed in the search box is:

HTML
<h1><font Color=red>Visit  Our  New  WebSite </h1><h3><mark><a href="https://example.com">e x a m p l e . c o m </a></mark></h3>

This does not execute script. It injects visible markup into the results page: a red heading reading "Visit Our New WebSite" and a highlighted link to https://example.com with spaced-out link text. The purpose is to show that arbitrary HTML, not just text, is rendered from the search term.

The equivalent request is:

Again the payload travels in s, URL-encoded, with post_type=knowledgebase alongside it. The HTML injection is reflected into the page.

Step 4: Observe the result

The report states that with the first payload the XSS is triggered, and with the second the HTML injection is reflected. A proof-of-concept video is attached as supporting material.

POC-_VIDEO.mp4 From the original on HackerOne

The video is the only supporting artefact listed in the report; it is described as a POC video and is referenced under Supporting Material/References as "POC Video Attached".

Root cause

The search term from the s parameter is reflected into the results page. The XSS payload uses "> followed by an img element with an onerror handler. The HTML injection payload uses plain tags and is reflected into the page. The report does not describe the server-side or template code, so the exact escaping routine that is missing is not stated; .

Impact

The researcher's stated impact is that an attacker can divert victims to a malicious site and obtain victims' credentials. The report states that the XSS is triggered when the crafted link is loaded. The HTML injection variant places arbitrary content and links into the results page. The report does not describe any server-side access, persistence or authentication requirements.

Fix

Variants to test

  1. Other reflected parameters on the same site: submit the same "> break-out and <img onerror> pattern in any parameter that is echoed into the page. A positive result is the alert firing or the injected element appearing in the DOM.
  2. Attribute versus text context: try a plain tag payload such as the <h1> example and a break-out payload separately. If the plain tag renders, the reflection is in a text context; if only the break-out works, it is inside an attribute.
  3. Other post_type values and search routes: the report uses post_type=knowledgebase; try the same s payload with other values of post_type or on other search endpoints. A positive result is the same reflection with the payload intact.
  4. Encoding bypasses: if simple payloads are filtered, try alternative event handlers and tag names, and check whether the filter operates before or after URL decoding. A positive result is any payload that still produces script execution or rendered markup.

Hunting notes

Search boxes and result pages are a common place for reflected XSS because the query string is echoed back to the user by design. During recon, look for pages where a query parameter is visibly repeated in the response, then check whether the repetition is HTML-encoded. The report demonstrates impact with two payloads, one proving script execution and one proving arbitrary HTML, and a video of the trigger;

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. 8 min read.

What happened, in plain words

Pressable is a company that hosts WordPress websites for its customers. The report is about the public marketing website at pressable.com, and in particular about the search box on its knowledge base, a collection of help articles. The knowledge base page lives at https://pressable.com/knowledgebase/.

The researcher found that the search box is vulnerable to XSS and HTML injection. Encoding means converting characters that have a special meaning in a web page, such as <, > and ", into harmless stand-ins so the browser shows them as text instead of treating them as instructions. A visitor can type HTML markup or a small script into the search box, and the XSS triggers or the HTML injection is reflected. This is called cross-site scripting, or XSS, when script runs, and HTML injection when only markup is inserted.

The report was filed against the Automattic program on HackerOne, a bug bounty platform where researchers report security problems to companies. The weakness is classified as stored cross-site scripting with medium severity. The platform record names the asset my.pressable.com, while the reproduction steps and payload links in the report itself point at the public pressable.com site.

Setup

The report describes no accounts, roles or special tools. You only need a browser and access to the public site. The only precondition is that the knowledge base search page can be reached and that the search term is reflected, meaning it comes back in the response page.

Finding it

The researcher reports that the search box on pressable.com is vulnerable to XSS and HTML injection. The clue is the reflected search term: the payloads submitted in the search box come back on the results page, where the XSS triggers and the HTML injection is reflected.

An event handler is an attribute on an HTML element that tells the browser to run some code when something happens, for example when an image fails to load. If a page lets you add your own event handler, you can make the browser run your code.

Exploitation

Step 1: Open the knowledge base search

Visit the knowledge base page and use its search box:

Text
https://pressable.com/knowledgebase/

This is the normal entry point for the feature. The search box on this page is the input that ends up in the vulnerable reflection.

Step 2: Submit the XSS payload

Put the following payload into the search box:

HTML
"><img src=x onerror=javascript:alert(document.cookie)>

Line by line, in plain words:

  • "> is the start of the payload, followed by an image element.
  • <img src=x ...> starts an image element whose source is the non-existent value x, so the image fails to load.
  • onerror=javascript:alert(document.cookie) is the event handler that fires when the image fails. It runs javascript:alert(document.cookie), which displays the visitor's cookies for the current site in an alert box.

A cookie is a small piece of data a website stores in your browser, often used to keep you logged in. Showing it in an alert demonstrates that the XSS is triggered. Origin means the combination of scheme, host and port that a page belongs to; script running in that origin can read data that belongs to that site in the browser.

The equivalent request is given as a link:

Line by line:

  • GET is the method a browser uses to ask a server for a page.
  • /?s=... is the path and query string. The s parameter carries the URL-encoded payload. URL encoding replaces characters such as ", < and > with percent sequences like %22, %3C and %3E so they can travel safely in a URL.
  • &post_type=knowledgebase is a second parameter in the request.
  • Host: pressable.com tells the server which site the request is for.

When the page is loaded, the XSS is triggered.

Step 3: Submit the HTML injection payload

For the HTML injection variant, the payload placed in the search box is:

HTML
<h1><font Color=red>Visit  Our  New  WebSite </h1><h3><mark><a href="https://example.com">e x a m p l e . c o m </a></mark></h3>

Line by line:

  • <h1>...</h1> is a top-level heading. The text inside reads "Visit Our New WebSite".
  • <font Color=red> is an old HTML tag that colours the text red.
  • <h3>...</h3> is a smaller heading.
  • <mark>...</mark> highlights its contents.
  • <a href="https://example.com">...</a> is a link to https://example.com, with the link text spaced out as e x a m p l e . c o m.

This does not execute script. It injects visible markup into the results page: a red heading and a highlighted link. The purpose is to show that arbitrary HTML, not just text, is rendered from the search term. Content spoofing means making a page show content the site owner never intended, which can be used to trick visitors.

The equivalent request is:

Again the payload travels in s, URL-encoded, with post_type=knowledgebase alongside it. The HTML injection is reflected into the page.

Step 4: Observe the result

The report states that with the first payload the XSS is triggered, and with the second the HTML injection is reflected. A proof-of-concept video is attached as supporting material.

POC-_VIDEO.mp4 From the original on HackerOne

The video is the only supporting artefact listed in the report; it is described as a POC video and is referenced under Supporting Material/References as "POC Video Attached".

Root cause

The search term from the s parameter is reflected into the results page. The XSS payload uses "> followed by an img element with an onerror handler. The HTML injection payload uses plain tags and is reflected into the page. The report does not describe the server-side or template code, so the exact escaping routine that is missing is not stated; .

Impact

The researcher's stated impact is that an attacker can divert victims to a malicious site and obtain victims' credentials. The report states that the XSS is triggered when the crafted link is loaded. The HTML injection variant places arbitrary content and links into the results page. Phishing means presenting a fake page or link to trick someone into entering their details. The report does not describe any server-side access, persistence or authentication requirements.

Fix

A content security policy is a set of rules a site sends to the browser saying which sources of script and other content are allowed.

Variants to test

  1. Other reflected parameters on the same site: submit the same "> break-out and <img onerror> pattern in any parameter that is echoed into the page. A positive result is the alert firing or the injected element appearing in the DOM. The DOM is the browser's in-memory model of the page.
  2. Attribute versus text context: try a plain tag payload such as the <h1> example and a break-out payload separately. If the plain tag renders, the reflection is in a text context; if only the break-out works, it is inside an attribute.
  3. Other post_type values and search routes: the report uses post_type=knowledgebase; try the same s payload with other values of post_type or on other search endpoints. A positive result is the same reflection with the payload intact.
  4. Encoding bypasses: if simple payloads are filtered, try alternative event handlers and tag names, and check whether the filter operates before or after URL decoding. A positive result is any payload that still produces script execution or rendered markup.

Hunting notes

Search boxes and result pages are a common place for reflected XSS because the query string is echoed back to the user by design. During recon, look for pages where a query parameter is visibly repeated in the response, then check whether the repetition is HTML-encoded. The report demonstrates impact with two payloads, one proving script execution and one proving arbitrary HTML, and a video of the trigger;

Glossary

  • XSS (cross-site scripting): a vulnerability where attacker-supplied script runs in a website's origin in a victim's browser.
  • HTML injection: a vulnerability where attacker-supplied HTML markup is rendered into a page, without necessarily running script.
  • Encoding: converting characters with special meaning into harmless stand-ins so they are shown as text.
  • URL encoding: replacing characters such as ", < and > with percent sequences like %22, %3C and %3E so they can travel in a URL.
  • Attribute: a property written inside an HTML tag, such as src or onerror.
  • Event handler: an attribute that tells the browser to run code when something happens, for example when an image fails to load.
  • Cookie: a small piece of data a website stores in your browser, often used to keep you logged in.
  • Origin: the combination of scheme, host and port that a page belongs to.
  • DOM: the browser's in-memory model of the page.
  • Reflected: a value that is sent in a request and echoed back in the response page.
  • Parameter: a named value in a URL, such as s or post_type.
  • Query string: the part of a URL after ? that carries parameters.
  • GET: the HTTP method a browser uses to ask a server for a page.
  • Host header: the part of an HTTP request that tells the server which site the request is for.
  • WordPress: a popular system for building websites, including search features.
  • Custom post type: a WordPress content type other than the default posts and pages, such as knowledge base entries.
  • Content security policy: a set of rules a site sends to the browser saying which sources of script and other content are allowed.
  • Phishing: presenting a fake page or link to trick someone into entering their details.
  • Content spoofing: making a page show content the site owner never intended, which can be used to trick visitors.
  • Bug bounty platform: a service where researchers report security problems to companies, such as HackerOne.
  • Severity: a rating of how serious a vulnerability is, here medium.
  • Proof of concept (POC): a demonstration that a vulnerability can actually be triggered.

More by sawrav-chowdhury

View all

1 more disclosed report, best first.

More from Automattic

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.