Cross Site Scripting (XSS) - What Is It & What's An Example
Cross Site Scripting (XSS) - What Is It & What's An Example
To avoid such an attack on your site and to protect your users’ data, you
have to first understand what cross site scripting is and what makes your site
vulnerable to this type of attack. Let’s take a closer look below.
cm
Cross site scripting, often shortened to XSS, is a type of attack in which a user
injects malicious code into an otherwise legitimate and trustworthy website or
application in order to execute that malicious code in another user’s web
browser. Because that browser thinks the code is coming from a trusted source,
it will execute the code.
The goal of the attacker might be to gain access to a user’s data, like any
cookies or session tokens retained by the browser, to masquerade as the user in
order to carry out certain actions in the application, or to redirect the user to a
harmful website that they control.
A user that requests the stored information from the server will also retrieve the
malicious script and become a victim of this type of XSS attack.
When a user interacts with this malicious script by, for example, clicking on a
link in an email, submitting a form, or browsing a web page, then the script
travels to the compromised website and reflects the attack back to the user’s
browser. Meaning, the user’s browser accepts and executes the malicious script
from the website because it trusts its server.
So the key difference between stored and reflected XSS is the source of the
malicious script that is included in an HTTP response generated by the server.
The source of the script in stored XSS is a stored location. The source of the
script in reflected XSS is the request.
So the key difference between DOM based XSS attacks and stored and
reflected XSS attacks is that the source of the malicious script is the client, not
the server. That’s why DOM based cross site scripting is considered a subset of
client XSS, whereas stored and reflected cross site scripting is considered server
XSS.
XSS Attacks
Cross site scripting attacks can have a severe technical and business impact
that may result in the loss of customer trust and revenue. Understanding what
cross site scripting is and what makes your web application vulnerable to them
is an important starting point to prevention.
Topics: Cyber Security
Related Articles
Popular Features
Free Tools
Company
Customers
Partners
Copyright © 2024 HubSpot, Inc.
| | | |
Legal Stuff Privacy Policy Security Website Accessibility
Manage Cookies