Reflected XSS on Pangle Endpoint
The Pangle endpoint reflected user-supplied data from the 'redirect' parameter without HTML escaping or output encoding. An attacker could have a JavaScript payload returned and executed in a user's browser.
- Triaged in 14 days
- Fixed in 39 days
- Paid in 38 days
- Disclosed after 2 months
Summary by the program
A cross-site scripting (XSS) vulnerability was found at the Pangle endpoint via the 'redirect' parameter. This was caused by the reflection of user-supplied data without appropriate HTML escaping or output encoding. As a result, a JavaScript payload could have been returned by the above endpoint and executed within a user's browser. We saw no evidence of exploitation before the vulnerability was fixed and additional mitigations applied. We thank @m7x for reporting this to our team and confirming its remediation.
What the report shows
The target is the Pangle endpoint at www.pangleglobal.com. The program's summary describes a reflected cross-site scripting (XSS) vulnerability reached through the redirect parameter. The flaw was that user-supplied data was reflected without appropriate HTML escaping or output encoding, so a JavaScript payload could be returned by the endpoint and executed inside a user's browser.
The report does not include the exact request, the payload string, or the response body, so the mechanics can only be described at the level the summary gives: a value supplied in redirect was echoed back into the page and interpreted as markup and script rather than as inert text.
The program states that it saw no evidence of exploitation before the vulnerability was fixed and additional mitigations were applied. The platform record lists the severity as high with a CVSS score of 7.1, a bounty of 5,000 USD, and disclosure on 5 April 2024. The program's summary credits the reporter as @m7x.
Root cause
The root cause is a missing output encoding step. The application took a value from the request, placed it into an HTML response, and did not escape it for the context in which it landed. When a parameter is reflected into an HTML body, an attribute, or a script block, the correct escaping depends on that context; applying none of it means the browser parses the attacker's characters as part of the document structure. The report points to this directly for the redirect parameter, though it does not show the code path that produced the reflection.
Impact
Because the payload executes in the victim's browser in the origin of the affected site, an attacker who can get a victim to follow a crafted link can run script with that origin's privileges. In practice that means running script with the privileges of that origin, though the summary does not detail what the origin holds. The program's own wording is careful: it confirms that a JavaScript payload could have been returned and executed, and states that no exploitation was observed before the fix. The practical ceiling of the bug therefore depends on what the affected origin holds, which the summary does not detail.
How this kind of bug works
Reflected XSS arises when a server builds a response from request data without encoding it for the destination context. The browser receives a document that mixes trusted template markup with untrusted input; if the input contains characters such as <, >, ", ' or & that are not escaped, the parser treats them as syntax. A payload can then introduce a new element, break out of an attribute, or terminate a string inside an inline script.
The class persists because reflection points are everywhere: error messages, search pages, redirect helpers, language selectors, and login flows that echo a return URL. Frameworks often escape by default in templates but not in string concatenation, manual response writing, or client-side code that assigns to innerHTML. The defences that stop it are contextual output encoding, a restrictive Content Security Policy, correct Content-Type and charset headers, and treating all request data as untrusted regardless of which parameter it arrives in.
How to test for it
- Map every parameter that comes back in the response, including ones that only appear in redirects, hidden fields, or JavaScript variables. Tools that compare responses with and without a marker value help here.
- Send a unique alphanumeric marker first and locate every occurrence in the response body. Note the surrounding context: HTML text, an attribute value, a URL inside an attribute, or a script block.
- Send context-appropriate probe characters and observe whether they are escaped, stripped, or reflected verbatim. A positive result is seeing your markup or script syntax intact in the response and, in a browser, seeing it execute.
- Confirm execution rather than reflection alone: load the crafted URL in a browser and check whether script runs, for example by observing a dialog or a callback to a listener you control.
- Test the same parameter with different encodings and with server-side filters in mind, since some filters only catch the obvious forms.
Common false positives: the value is reflected but HTML-encoded, so it renders as text; the reflection lands in a context where the browser does not execute it, such as inside a comment or a non-scriptable element; a web application firewall blocks the payload but the underlying sink is still reachable with a variant; or the page is served with a Content-Type that prevents HTML interpretation. Always verify in a real browser before reporting.
How it is fixed
Apply contextual output encoding at the point where data is written into the response, using the escaping appropriate to HTML text, attributes, URLs, and JavaScript. Prefer templating engines with auto-escaping and avoid manual string building for HTML. Validate and allow-list values where the domain permits it, such as redirect targets restricted to known paths. Add a Content Security Policy that blocks inline script where feasible, set correct Content-Type and charset headers, and use framework features such as trusted types on the client. Regression tests should cover each reflection point.
Hunting notes
Reflection points cluster around features that echo user input back for convenience: search results, error and notice pages, login and logout return URLs, language and theme switches, and anything named redirect, next, return, url, or callback. Redirect helpers are worth attention because developers often treat them as plumbing rather than as output.
Recon signals include parameters that appear in the query string but not in the visible page, responses whose bodies contain the request value in more than one place, and endpoints that build links from user input. Reading JavaScript bundles for client-side sinks such as innerHTML, document.write, or location assignment can reveal where server data is later inserted into the DOM.
To make a report land, show the exact request and response, demonstrate execution in a browser with a benign payload, and explain what an attacker gains in that origin. Keep the proof minimal and reproducible, and avoid touching other users' data. Programs respond best to a clear reproduction path and a stated impact that matches what the evidence supports.
What happened, in plain words
A security researcher found a bug on a website called Pangle, at the address www.pangleglobal.com. The report was filed through TikTok's bug bounty programme on HackerOne, a platform where researchers report security problems to companies.
The bug is a reflected cross-site scripting flaw, usually shortened to XSS. To understand it, imagine a receptionist who repeats back whatever a visitor says. If a visitor says "my name is Alice", the receptionist says "your name is Alice". Now imagine a visitor says "my name is, and by the way, please open the safe". A receptionist who simply repeats the sentence without thinking might pass the instruction on as if it came from the boss. Reflected XSS is the web version of that: a website takes something a visitor typed into a link and repeats it back into the page without checking it, so the visitor's text can be treated as instructions by the browser.
The specific place this happened was a parameter called redirect. A parameter is a named value attached to the end of a web address, after a question mark, like ?redirect=.... Websites use parameters to carry information between pages, for example where to send you after you log in. The redirect parameter here was echoed back into the page without being properly escaped, which means the browser could be made to run JavaScript, the programming language of web pages, supplied by an attacker.
The programme's summary explains the cause plainly: user-supplied data was reflected without appropriate HTML escaping or output encoding. HTML is the language that describes the structure of a web page, and escaping (or output encoding) is the process of turning special characters into harmless text so the browser shows them instead of acting on them. Because that step was missing, a JavaScript payload could be returned by the endpoint and executed inside a user's browser. An endpoint is simply a specific address on a server that answers requests.
The report does not include the exact request, the payload string, or the response body, so we cannot see the precise characters that were sent. What we know is the level of detail in the summary: a value supplied in redirect was echoed back into the page and interpreted as markup and script rather than as inert text.
The programme states that it saw no evidence of exploitation before the vulnerability was fixed and additional mitigations were applied. In other words, the programme saw no evidence that anyone used the bug against real users before it was fixed. The platform record lists the severity as high, with a CVSS score of 7.1. CVSS is a standard scoring system for how serious a vulnerability is, where higher numbers mean more risk. The bounty was 5,000 USD, and the report was disclosed on 5 April 2024. The programme's summary credits the reporter as @m7x.
In general, how this kind of bug works
Reflected XSS happens when a server builds a page from data in the request without encoding it for where it lands. The browser receives a document that mixes the site's own trusted markup with untrusted input. If the input contains characters such as <, >, ", ' or & and they are not escaped, the browser's parser treats them as syntax rather than text. A payload can then introduce a new element, break out of an attribute, or end a string inside an inline script.
This class of bug persists because places that echo input are everywhere: error messages, search pages, redirect helpers, language selectors, and login flows that echo a return address. Frameworks often escape by default in templates but not in string concatenation, manual response writing, or client-side code that assigns to innerHTML. The defences are contextual output encoding, a restrictive Content Security Policy, correct Content-Type and charset headers, and treating all request data as untrusted regardless of which parameter it arrives in.
How to test for it
- Map every parameter that comes back in the response, including ones that only appear in redirects, hidden fields, or JavaScript variables. Tools that compare responses with and without a marker value help here.
- Send a unique alphanumeric marker first and locate every occurrence in the response body. Note the surrounding context: HTML text, an attribute value, a URL inside an attribute, or a script block.
- Send context-appropriate probe characters and observe whether they are escaped, stripped, or reflected verbatim. A positive result is seeing your markup or script syntax intact in the response and, in a browser, seeing it execute.
- Confirm execution rather than reflection alone: load the crafted URL in a browser and check whether script runs, for example by observing a dialog or a callback to a listener you control.
- Test the same parameter with different encodings and with server-side filters in mind, since some filters only catch the obvious forms.
Common false positives: the value is reflected but HTML-encoded, so it renders as text; the reflection lands in a context where the browser does not execute it, such as inside a comment or a non-scriptable element; a web application firewall blocks the payload but the underlying sink is still reachable with a variant; or the page is served with a Content-Type that prevents HTML interpretation. Always verify in a real browser before reporting.
How it is fixed
Apply contextual output encoding at the point where data is written into the response, using the escaping appropriate to HTML text, attributes, URLs, and JavaScript. Prefer templating engines with auto-escaping and avoid manual string building for HTML. Validate and allow-list values where the domain permits it, such as redirect targets restricted to known paths. Add a Content Security Policy that blocks inline script where feasible, set correct Content-Type and charset headers, and use framework features such as trusted types on the client. Regression tests should cover each reflection point.
Hunting notes
Reflection points cluster around features that echo user input back for convenience: search results, error and notice pages, login and logout return URLs, language and theme switches, and anything named redirect, next, return, url, or callback. Redirect helpers are worth attention because developers often treat them as plumbing rather than as output.
Recon signals include parameters that appear in the query string but not in the visible page, responses whose bodies contain the request value in more than one place, and endpoints that build links from user input. Reading JavaScript bundles for client-side sinks such as innerHTML, document.write, or location assignment can reveal where server data is later inserted into the DOM.
To make a report land, show the exact request and response, demonstrate execution in a browser with a benign payload, and explain what an attacker gains in that origin. Keep the proof minimal and reproducible, and avoid touching other users' data. Programmes respond best to a clear reproduction path and a stated impact that matches what the evidence supports.
Glossary
- XSS (cross-site scripting): a bug where a website lets an attacker's text be treated as code by a visitor's browser.
- Reflected XSS: XSS where the attacker's input is echoed straight back in the response to the same request.
- Parameter: a named value attached to a web address after a question mark, used to pass information between pages.
- Endpoint: a specific address on a server that answers requests.
- HTML: the language that describes the structure and content of a web page.
- Escaping / output encoding: converting special characters into harmless text so the browser displays them instead of acting on them.
- Payload: the piece of input an attacker sends to trigger a bug.
- JavaScript: the programming language that runs in web browsers and makes pages interactive.
- CVSS: a standard scoring system for the severity of a vulnerability, where higher numbers mean more risk.
- Bounty: a reward a company pays a researcher for reporting a valid security problem.
- Mitigation: an extra safeguard added to reduce risk, often alongside a fix.
- Content Security Policy: a set of rules a site sends to the browser saying which scripts it may run.
- Content-Type header: information the server sends telling the browser what kind of content it is receiving.
- Web application firewall: a filter that inspects incoming requests and blocks ones that look malicious.
- innerHTML: a JavaScript property that sets the HTML content of an element, which can turn text into markup.
- DOM: the browser's in-memory model of a page, which scripts read and change.