A Weird CSP Bypass led to $3.5k Bounty
A user-controlled subdomain allowed XSS, and the main site's API trusted that subdomain via CORS, but CSP blocked the exploit. The attacker bypassed CSP by injecting a new connect-src directive through a trusted-sites feature, enabling theft of authentication cookies.
Published on blog.voorivex.team
After doing common tasks like subdomain enumeration, I found a complex web application with many features that allowed users to set up their own e-commerce sites. Working on and setting up the website was quite difficult, as I couldn't create a valid e-commerce site within several hours.
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.
Context
The target was a complex web application that let users set up their own e-commerce sites on subdomains of a shared domain, so a user could create a site such as evil.freehost-target.com. The main website sat on a separate domain, referred to here as mainsite, and exposed an API endpoint that returned user PII data together with an authentication cookie in a JSON object. The report calls that endpoint cookie-endpoint.
The interesting part of the design is that user content lives on *.freehost-target.com while the sensitive API lives on mainsite. That separation is the usual defence against stored XSS in user sites: arbitrary JavaScript on a user subdomain is not same-origin with the main application. The report makes this explicit by comparing the setup to a hosting provider whose main domain differs from the free-hosting domain given to users.
Setup
The researcher began with subdomain enumeration and found the e-commerce platform. Creating a working e-commerce site took several hours of reading documentation and watching the company's YouTube videos, and the report notes that many hunters would abandon the target at this point because of the complexity of registration and setup. Persistence here was a precondition for everything that follows: a working user site on *.freehost-target.com was needed to host the malicious page.
The second precondition was a victim logged in to the main website, so that a request from the attacker's page to https://mainsite/cookie-endpoint would carry the victim's authentication cookie. The researcher collaborated with Yashar Shahinzadeh (YShahinzadeh) on the CSP part of the work.
Finding it
On the user subdomain, the researcher could trigger XSS, but it was useless on its own: the subdomain is not the main application's origin, so the script could not read anything belonging to mainsite. The report describes this as "a useless XSS in a useless subdomain" and stresses not falling into that rabbit hole.
Exploring other parts of the target led to an API call on the company's main website whose response contained user PII and an authentication cookie. The researcher notes that returning an authentication cookie in a JSON object is not common. Testing that API for CORS misconfigurations showed it allowed access from *.freehost-target.com.

The image shows the CORS test result with *.freehost-target.com on the trusted list.
At this point two pieces existed: an XSS on *.freehost-target.com and a sensitive API that trusted *.freehost-target.com. Chaining them looks obvious: host JavaScript on a user subdomain, have a logged-in victim open it, make an authenticated request to the API, read the response containing the authentication cookie, and exfiltrate it. The researcher built exactly that page, and the authentication cookie did not arrive.
Inspecting the exploit code and the traffic showed why: a connect-src CSP header on the main domain prevented the victim's browser from sending the HTTP request to the sensitive endpoint. The attack scenario, as written in the report:
- Set up a malicious website, like
evil.freehost-target.com - Trick a victim into opening
evil.freehost-target.comwhile they are logged in to the main website - JS code sends an authenticated HTTP request to the
https://mainsite/cookie-endpointand captures the response, which contains the authentication cookie. This failed because of the CSP rules. - JS code sends the victim's data to the attacker's website. This also failed, because data could not be exfiltrated directly due to CSP.
Exploitation
Step 1: read the CSP of the main domain
The CSP rules of the main domain were something like this:

The image shows the CSP rules of the main domain. The key point is that https://mainsite/cookie-endpoint is not on the whitelist, so the victim cannot be made to send a request to that endpoint and return the authentication cookie. The researcher tried various ways to bypass the CSP and found nothing, which is when the collaboration started.
Step 2: find the trusted-websites feature
Eventually the researchers found that the website owner could add trusted websites to the CSP rules through a configuration interface.


The two images show the trusted-websites configuration UI and the act of adding the cookie endpoint to the trusted-websites list. This is the feature that turns a fixed CSP into one an attacker can influence.
Step 3: observe where the trusted site lands
Adding https://mainsite/cookie-endpoint to the Trusted Sites list produced this response:

As the image shows, the trusted website was appended to the script-src directive value. That means remote scripts could be loaded from https://mainsite/cookie-endpoint, but the response could not be read and parsed to retrieve the authentication cookie. Loading a script is not the same as reading a response body, so this alone does not solve the problem.
Step 4: try to break out of the meta tag
The first attempt was to break the meta tag and drop the connect-src part:
https://mainsite/cookie-endpoint "><!--
This did not work. Server-side restrictions filtered the ", so the tag could not be broken.
Step 5: try to append a new directive
The next attempt was to add another directive, such as connect-src, and see how the website and the browser reacted:
https://mainsite/cookie-endpoint;%20connect-src
This resulted in:
<meta http-equiv="Content-Security-Policy"
content="defualt-src 'self';
connect-src 'self' https://evil.freehost-target.com;
script-src 'self' 'unsafe-eval' https://mainsite/cookie-endpoint; connect-src">
A new CSP rule could indeed be added. Note that the injected text lands inside the policy string, and the semicolon plus encoded space separates directives.
Step 6: put the target into the new connect-src
The next payload tried to include the target in the new connect-src:
https://mainsite/cookie-endpoint;%20connect-src https://mainsite/cookie-endpoint;
This resulted in:
<meta http-equiv="Content-Security-Policy"
content="defualt-src 'self';
connect-src 'self' https://evil.freehost-target.com;
script-src 'self' 'unsafe-eval' https://mainsite/cookie-endpoint;
connect-src https://mainsite/cookie-endpoint;">
The payload adds a new connect-src CSP rule at the end of the policy. When the exploit was executed, however, the connect-src CSP error appeared again.

The image shows the browser still raising the connect-src CSP error despite the appended directive.
Step 7: understand the browser behaviour
To explain the failure, the researchers built a simple test-bed. After some testing they found that the browser only applies the first CSP rule. In the example above it considers only connect-src 'self' https://evil.freehost-target.com; and ignores connect-src https://mainsite/cookie-endpoint;. Duplicate directives do not merge; the first one wins.
Step 8: move the original connect-src and append the target to it
With testing ideas exhausted, the researchers ran unconventional tests to understand the backend code. They noticed that when a new connect-src was added with a value taken from the default connect-src, the connect-src moved to the end of the tag and the new value was added to the end of the CSP. The example payload:
https://evil.freehost-target.com;%20connect-src https://mainsite/cookie-endpoint;
produced:
<meta http-equiv="Content-Security-Policy"
content="defualt-src 'self';
script-src 'self' 'unsafe-eval' https://evil.freehost-target.com;
connect-src 'self' https://evil.freehost-target.com; https://mainsite/cookie-endpoint;">
Here https://mainsite/cookie-endpoint is appended to the value of the existing connect-src directive, which already contains https://evil.freehost-target.com. Because the browser applies that first (and now only) connect-src, the request to the cookie endpoint is allowed. The security barrier in step 3 of the attack scenario was removed. The same technique was used to overcome step 4, exfiltration to the attacker's site, since https://evil.freehost-target.com is part of the same connect-src value. Combining the XSS, the CORS misconfiguration and the CSP bypass yielded the victim's authentication cookie.
Root cause
The design flaw is that the trusted-websites feature lets a site owner inject arbitrary text into the CSP policy string without validating it as a URL or as a directive value. The value is placed into the policy, and characters such as ; and the encoded space let the owner start a new directive or extend an existing one. The server filters ", which blocks breaking out of the meta tag, but it does not stop directive injection inside the policy.
The second half of the bug is in how the backend rebuilds the policy. When the injected connect-src names a value that already exists in the default connect-src, the backend moves that directive to the end and appends the new value to it, rather than keeping a separate duplicate directive. That behaviour is what makes the bypass work: a duplicate connect-src would be ignored by the browser, but an extended first connect-src is honoured. The report describes the observed behaviour but does not show the backend code, so the exact implementation is not stated.
The existing defences did not stop the chain: the separate user domain prevented the XSS from being directly useful, and the CSP connect-src prevented the request to the cookie endpoint, but the trusted-websites feature gave the attacker a way to modify the policy itself.
Impact
Under the conditions in the report, an attacker who can host a page on *.freehost-target.com and who can get a logged-in victim to open it can make an authenticated request to https://mainsite/cookie-endpoint, read the response containing the victim's PII and authentication cookie, and exfiltrate it to the attacker's site. The report describes the XSS as useless on its own and the CORS misconfiguration as the second flaw; the CSP bypass is what makes the chain work. The report does not give a CVSS score or a severity rating.
Fix
The report does not describe a fix or a retest. Based on the mechanism, the trusted-websites value should be validated as a URL and rejected if it contains characters that can alter the policy, such as ;, and the backend should not move or extend existing directives based on user input.
Variants to test
- On any platform with a CSP editor or trusted-sites list, submit a value containing
;followed by a directive name and see whether the response policy contains a new directive. A positive result is a directive you did not configure appearing in the returnedContent-Security-Policy. - Submit a value that duplicates an existing directive, such as
connect-src, and check whether the browser ignores it. A positive result is the original directive still being enforced, which confirms the duplicate-directive behaviour. - Submit a value taken from the default directive, as in
https://evil.example;%20connect-src https://target.example;, and check whether the original directive moves to the end with your value appended. A positive result is your host appearing inside the firstconnect-srcvalue. - Test whether quote characters are filtered but other policy metacharacters are not. A positive result is a
"being rejected while;and encoded spaces pass through into the policy. - Look for APIs that return authentication cookies in JSON and check their CORS configuration for wildcard subdomains. A positive result is
Access-Control-Allow-Originreflecting a user-controlled subdomain together with credentials being allowed. - Combine a user-content subdomain XSS with such an API and a CSP editor. A positive result is a request from the user subdomain to the sensitive endpoint succeeding after the policy is modified through the editor.
What happened, in plain words
A company ran a service that let anyone create their own small online shop on a subdomain of a shared domain. If the shared domain was freehost-target.com, a customer could end up with a shop at evil.freehost-target.com. The company's main website, which we will call mainsite, was on a different domain. That main website had a special web address (an API endpoint) that, when asked politely, handed back private information about the logged-in user together with the user's authentication cookie. The report calls that address cookie-endpoint.
An authentication cookie is a small piece of text your browser stores after you log in. Your browser sends it back to the website on every request so the site knows who you are. Think of it as a wristband you get at a festival: show it at the gate and you get back in without buying another ticket. If someone else copies your wristband, they can walk in as you. That is why a web address that returns the cookie in its response is dangerous.
The researcher found two separate weaknesses. First, a cross-site scripting (XSS) bug on the customer subdomain: the researcher could make the subdomain run JavaScript of their choosing. JavaScript is the programming language browsers run, so this means the researcher could make the victim's browser do things. On its own this XSS was useless, because the subdomain is a different origin from mainsite, and browsers keep different origins apart. Second, the sensitive API on mainsite was configured to accept requests coming from any subdomain of freehost-target.com. Put together, the obvious attack is: host a malicious page on a customer subdomain, get a logged-in victim to open it, have the page ask the API for the cookie, read the answer, and send it to the attacker.
The researcher built exactly that, and the cookie never arrived. The reason was a browser security feature called Content Security Policy (CSP). CSP is a list of rules the website sends to the browser saying what the page is allowed to do: which scripts it may load, which addresses it may contact, and so on. One of those rules, connect-src, controls which addresses the page is allowed to send network requests to. The cookie endpoint was not on that list, so the browser blocked the request.
The researcher then found a feature in the shop configuration: the shop owner could add "trusted websites" to the CSP. That feature turned out to be the way in. By feeding it carefully crafted text, the researcher could make the server write extra rules into the CSP, and eventually make the browser accept the cookie endpoint as a place the page was allowed to contact. The chain of three flaws (the XSS, the loose CORS setting, and the CSP bypass) let the researcher steal a victim's authentication cookie.
Recon
Reconnaissance (recon) is the first phase of any security test: looking around to see what the target is made of. A common first step is subdomain enumeration, which means finding all the subdomains that belong to a company, such as shop.example.com, blog.example.com and so on. Each subdomain can be a different application with different bugs.
After doing common tasks like subdomain enumeration, the researcher found a complex web application with many features that allowed users to set up their own e-commerce sites. An e-commerce site is an online shop. The platform let a customer build a shop with its own subdomain, for example evil.freehost-target.com.
Setting up the shop was hard. The researcher spent several hours reading documentation and watching the company's YouTube videos before a working shop existed. The report points out that many bug hunters give up at this stage, when registration or setup is painful. Persistence paid off here: without a working shop on the shared subdomain, none of the later steps would have been possible.
Analysing the target
In companies that let users host their own sites, XSS is usually not a serious problem, because each user gets a completely different domain. The report gives the example of the Hostinger program on HackerOne: the main domain is hostinger.com, but the free hosting for users lives on *.000webhost.com. The * is a wildcard meaning "any subdomain". Because the user content is on a different domain from the main application, a script running on a user's site cannot read anything that belongs to the main site. Browsers enforce this separation, called the same-origin policy: a page from one origin cannot read data from another origin unless the other origin explicitly allows it.
In this target the situation was the same: the researcher could trigger XSS, but could not use it for anything. The report calls this "a useless XSS in a useless subdomain". The lesson the researcher draws is not to fall into that rabbit hole, meaning not to keep digging in one place when it leads nowhere, and to explore other parts of the target instead.
That exploration found an interesting API call on the company's main website. An API is a web address designed to be called by software rather than read by a person: you send a request, you get structured data back (often JSON, a text format for data). The API call's response included user PII data and an authentication cookie. PII stands for personally identifiable information: names, addresses, and other data that identifies a real person. The researcher notes that returning an authentication cookie inside a JSON object is not common.
Immediately the researcher tested the API for CORS misconfigurations. CORS stands for Cross-Origin Resource Sharing. It is the mechanism by which one website tells the browser "it is fine for pages from these other origins to read my responses". A misconfiguration is a setting that is too permissive. Here the API allowed access from *.freehost-target.com, meaning any customer subdomain could read its responses.

The image shows the CORS test result, with *.freehost-target.com on the trusted list.
At this point the researcher had two pieces:
- a useless XSS in
*.freehost-target.com - a sensitive API that had
*.freehost-target.comin its trusted domains
Most readers will see the chain: host JavaScript on a customer subdomain, get a logged-in victim to open it, make an authenticated request to the API, read the response with the cookie, and send it to the attacker. An authenticated request is one that carries the victim's cookie, so the server treats it as coming from the victim. The researcher built exactly that page, and the cookie did not arrive.
Looking at the exploit code and the network traffic showed why: a connect-src CSP header on the main domain prevented the victim's browser from sending the HTTP request to the sensitive endpoint. A header is a piece of metadata the server sends alongside the page. connect-src is the CSP rule that lists which addresses the page may contact with network requests such as fetch or XMLHttpRequest.
The attack scenario, as written in the report:
- Set up a malicious website, like
evil.freehost-target.com - Trick a victim into opening
evil.freehost-target.comwhile they are logged in to the main website - JS code sends an authenticated HTTP request to the
https://mainsite/cookie-endpointand captures the response, which contains the authentication cookie. This failed because of the CSP rules. - JS code sends the victim's data to the attacker's website. This also failed, because data could not be exfiltrated directly due to CSP.
Exfiltration means getting stolen data out to a server the attacker controls. Both the request to the API and the request to the attacker's server are network requests, so both are governed by connect-src.
CSP rules
The CSP rules of the main domain were something like this:

The image shows the CSP rules of the main domain. The important point is that https://mainsite/cookie-endpoint is not on the whitelist. A whitelist is a list of things that are allowed; anything not on it is blocked. So the victim cannot be made to send a request to that endpoint and return the authentication cookie. The researcher tried various ways to bypass the CSP and found nothing, which is when the collaboration with Yashar Shahinzadeh (YShahinzadeh) started.
Finding the trusted-websites feature
Eventually the researchers found that the website owner could add trusted websites to the CSP rules through a configuration interface. A configuration interface is a page in the shop's admin panel where the owner changes settings.


The two images show the trusted-websites configuration UI and the act of adding the cookie endpoint to the trusted-websites list. This is the feature that turns a fixed CSP into one an attacker can influence: instead of the policy being written once by the platform, the shop owner can add text to it.
Observing where the trusted site lands
Adding https://mainsite/cookie-endpoint to the Trusted Sites list produced this response:

As the image shows, the trusted website was appended to the script-src directive value. A directive is one rule inside a CSP, and script-src is the rule listing where scripts may be loaded from. So remote scripts could be loaded from https://mainsite/cookie-endpoint, but the response could not be read and parsed to retrieve the authentication cookie. Loading a script is not the same as reading a response body: the browser fetches the script and runs it, but the page that loaded it does not get to see the text. So this alone does not solve the problem.
Trying to break out of the meta tag
The first attempt was to break the meta tag and drop the connect-src part:
https://mainsite/cookie-endpoint "><!--
Line by line:
https://mainsite/cookie-endpointis the value the researcher submitted as a trusted site."is a double quote. The CSP is written inside an HTML attribute, which is delimited by quotes. If the value could contain a quote, the attribute would end early.>would close the HTML tag.<!--starts an HTML comment, which would hide whatever came after.
The idea was to end the attribute and the tag early, so the rest of the original CSP (including connect-src) would be commented out. This did not work. Server-side restrictions filtered the ", so the tag could not be broken.
Trying to append a new directive
The next attempt was to add another directive, such as connect-src, and see how the website and the browser reacted:
https://mainsite/cookie-endpoint;%20connect-src
Line by line:
https://mainsite/cookie-endpointis again the submitted value.;is the character that separates directives inside a CSP. If the server pastes the value into the policy without escaping it, the semicolon starts a new directive.%20is the URL encoding of a space. A space is needed between the directive name and its value.connect-srcis the name of the directive the researcher wanted to add.
This resulted in:
<meta http-equiv="Content-Security-Policy"
content="defualt-src 'self';
connect-src 'self' https://evil.freehost-target.com;
script-src 'self' 'unsafe-eval' https://mainsite/cookie-endpoint; connect-src">
Line by line:
<meta http-equiv="Content-Security-Policy"is an HTML tag that tells the browser "treat the following content as a CSP".http-equivmeans the value mimics an HTTP header.content="..."holds the actual policy text.defualt-src 'self';is the default rule (note the typodefualt-srcin the report).'self'means "the same origin as this page".connect-src 'self' https://evil.freehost-target.com;allows network requests to the page's own origin and tohttps://evil.freehost-target.com.script-src 'self' 'unsafe-eval' https://mainsite/cookie-endpoint; connect-srcis the script rule, with the submitted value appended.'unsafe-eval'allows theevalfunction, which runs text as code. The trailingconnect-srcis the injected directive name, sitting at the end with no value.
A new CSP rule could indeed be added. The injected text lands inside the policy string, and the semicolon plus encoded space separates directives.
Putting the target into the new connect-src
The next payload tried to include the target in the new connect-src:
https://mainsite/cookie-endpoint;%20connect-src https://mainsite/cookie-endpoint;
Line by line:
https://mainsite/cookie-endpointis the submitted value.;ends the current directive.%20is the encoded space.connect-srcstarts a new directive.https://mainsite/cookie-endpoint;is the value for that directive, followed by a semicolon to close it.
This resulted in:
<meta http-equiv="Content-Security-Policy"
content="defualt-src 'self';
connect-src 'self' https://evil.freehost-target.com;
script-src 'self' 'unsafe-eval' https://mainsite/cookie-endpoint;
connect-src https://mainsite/cookie-endpoint;">
Line by line:
- The first three lines are the same as before.
script-src 'self' 'unsafe-eval' https://mainsite/cookie-endpoint;is the script rule, now ending with a semicolon.connect-src https://mainsite/cookie-endpoint;is a secondconnect-srcdirective, added at the end of the policy, allowing requests to the cookie endpoint.
The payload adds a new connect-src CSP rule at the end of the policy. When the exploit was executed, however, the connect-src CSP error appeared again.

The image shows the browser still raising the connect-src CSP error despite the appended directive.
Understanding the browser behaviour
To explain the failure, the researchers built a simple test-bed: a small page of their own where they could try the same policy and watch what the browser did. After some testing they found that the browser only applies the first CSP rule. In the example above it considers only connect-src 'self' https://evil.freehost-target.com; and ignores connect-src https://mainsite/cookie-endpoint;. The browser only applies the first CSP rule, which is why the second connect-src had no effect.
Moving the original connect-src and appending the target to it
With testing ideas exhausted, the researchers ran unconventional tests to understand the backend code. The backend is the server-side software that builds the page. They noticed that when a new connect-src was added with a value taken from the default connect-src, the connect-src moved to the end of the tag and the new value was added to the end of the CSP. The example payload:
https://evil.freehost-target.com;%20connect-src https://mainsite/cookie-endpoint;
Line by line:
https://evil.freehost-target.comis a value that already exists in the defaultconnect-src.;ends the current directive.%20is the encoded space.connect-srcstarts a new directive.https://mainsite/cookie-endpoint;is the value for that directive, followed by a semicolon.
produced:
<meta http-equiv="Content-Security-Policy"
content="defualt-src 'self';
script-src 'self' 'unsafe-eval' https://evil.freehost-target.com;
connect-src 'self' https://evil.freehost-target.com; https://mainsite/cookie-endpoint;">
Line by line:
defualt-src 'self';is the default rule, unchanged.script-src 'self' 'unsafe-eval' https://evil.freehost-target.com;is the script rule, now listinghttps://evil.freehost-target.com.connect-src 'self' https://evil.freehost-target.com; https://mainsite/cookie-endpoint;is the singleconnect-srcrule, with the cookie endpoint appended to its value.
Here https://mainsite/cookie-endpoint is appended to the value of the existing connect-src directive, which already contains https://evil.freehost-target.com. Because the browser applies that first (and now only) connect-src, the request to the cookie endpoint is allowed. The security barrier in step 3 of the attack scenario was removed. The same technique was used to overcome step 4, exfiltration to the attacker's site, since https://evil.freehost-target.com is part of the same connect-src value. Combining the XSS, the CORS misconfiguration and the CSP bypass yielded the victim's authentication cookie.
Root cause
The design flaw is that the trusted-websites feature lets a site owner inject arbitrary text into the CSP policy string without validating it as a URL or as a directive value. Validation means checking that the input is what it claims to be. The value is placed into the policy, and characters such as ; and the encoded space let the owner start a new directive or extend an existing one. The server filters ", which blocks breaking out of the meta tag, but it does not stop directive injection inside the policy.
The second half of the bug is in how the backend rebuilds the policy. When the injected connect-src names a value that already exists in the default connect-src, the backend moves that directive to the end and appends the new value to it, rather than keeping a separate duplicate directive. That behaviour is what makes the bypass work: a duplicate connect-src would be ignored by the browser, but an extended first connect-src is honoured. The report describes the observed behaviour but does not show the backend code, so the exact implementation is not stated.
The existing defences did not stop the chain: the separate user domain prevented the XSS from being directly useful, and the CSP connect-src prevented the request to the cookie endpoint, but the trusted-websites feature gave the attacker a way to modify the policy itself.
Impact
Under the conditions in the report, an attacker who can host a page on *.freehost-target.com and who can get a logged-in victim to open it can make an authenticated request to https://mainsite/cookie-endpoint, read the response containing the victim's PII and authentication cookie, and exfiltrate it to the attacker's site. The report describes the XSS as useless on its own and the CORS misconfiguration as the second flaw; the CSP bypass is what makes the chain work. The report does not give a CVSS score or a severity rating.
Fix
The report does not describe a fix or a retest. Based on the mechanism, the trusted-websites value should be validated as a URL and rejected if it contains characters that can alter the policy, such as ;, and the backend should not move or extend existing directives based on user input.
Variants to test
- On any platform with a CSP editor or trusted-sites list, submit a value containing
;followed by a directive name and see whether the response policy contains a new directive. A positive result is a directive you did not configure appearing in the returnedContent-Security-Policy. - Submit a value that duplicates an existing directive, such as
connect-src, and check whether the browser ignores it. A positive result is the original directive still being enforced, which confirms the duplicate-directive behaviour. - Submit a value taken from the default directive, as in
https://evil.example;%20connect-src https://target.example;, and check whether the original directive moves to the end with your value appended. A positive result is your host appearing inside the firstconnect-srcvalue. - Test whether quote characters are filtered but other policy metacharacters are not. A positive result is a
"being rejected while;and encoded spaces pass through into the policy. - Look for APIs that return authentication cookies in JSON and check their CORS configuration for wildcard subdomains. A positive result is
Access-Control-Allow-Originreflecting a user-controlled subdomain together with credentials being allowed. - Combine a user-content subdomain XSS with such an API and a CSP editor. A positive result is a request from the user subdomain to the sensitive endpoint succeeding after the policy is modified through the editor.
Glossary
- API: a web address designed to be called by software, returning structured data such as JSON.
- Authentication cookie: a small piece of text stored by the browser after login and sent back on every request so the site knows who you are.
- Backend: the server-side software that builds pages and handles requests.
- Bug bounty: a programme where companies pay researchers for reporting security bugs.
- CORS (Cross-Origin Resource Sharing): the mechanism by which a site tells the browser which other origins may read its responses.
- CSP (Content Security Policy): a set of rules a site sends to the browser saying what the page may load and contact.
- connect-src: the CSP directive listing addresses the page may contact with network requests.
- CVSS: a scoring system for the severity of a vulnerability.
- Directive: one rule inside a CSP, such as
script-srcorconnect-src. - E-commerce site: an online shop.
- Exfiltration: getting stolen data out to a server the attacker controls.
- Header: metadata sent by the server alongside a page or response.
- HTML attribute: a name-value pair inside an HTML tag, such as
content="...". - HTTP request: a message a browser sends to a server asking for something.
- JSON: a text format for structured data.
- Meta tag: an HTML tag that gives the browser information about the page, such as a CSP.
- Origin: the combination of scheme, host and port that identifies where a page came from; browsers keep different origins apart.
- PII (personally identifiable information): data that identifies a real person, such as a name or address.
- Recon (reconnaissance): the first phase of a security test, looking around to see what the target is made of.
- Same-origin policy: the browser rule that a page from one origin cannot read data from another origin unless allowed.
- script-src: the CSP directive listing where scripts may be loaded from.
- Subdomain: a name under a main domain, such as
shop.example.comunderexample.com. - Subdomain enumeration: finding all the subdomains that belong to a company.
- URL encoding: writing special characters as
%followed by a code, such as%20for a space. - Validation: checking that input is what it claims to be.
- Whitelist: a list of things that are allowed; anything not on it is blocked.
- Wildcard: the
*character meaning "any", as in*.freehost-target.com. - XSS (cross-site scripting): a bug that lets an attacker run JavaScript of their choosing in someone else's browser on a site.