惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fox-IT International blog
Recent Announcements
Recent Announcements
D
Docker
IT之家
IT之家
B
Blog
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
量子位
C
Check Point Blog
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
博客园 - 司徒正美
李成银的技术随笔
美团技术团队
Blog — PlanetScale
Blog — PlanetScale
雷峰网
雷峰网
The GitHub Blog
The GitHub Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
有赞技术团队
有赞技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
T
Tailwind CSS Blog
H
Help Net Security
Engineering at Meta
Engineering at Meta
小众软件
小众软件
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
月光博客
月光博客
M
Microsoft Research Blog - Microsoft Research
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog

Vulnerabilities – ThreatDown by Malwarebytes

June 2025 Microsoft Patch Tuesday fixes two zero-days April 2025 Patch Tuesday includes one zero-day March 2025 Patch Tuesday, severity over quantity Why ransomware gangs want you to keep using that GPON router Hybrid cloud environments are not safe from ransomware Windows MSHTML vulnerability actively exploited Update now! Critical CVSS 10 vulnerability in Ivanti EPM Update now! Four zero-days fixed in September Patch Tuesday Ransomware gangs target SonicWall vulnerability
What is Cross-Site Scripting (XSS)?
2024-12-05 · via Vulnerabilities – ThreatDown by Malwarebytes

Cross-site scripting is a type of attack where a vulnerability in web applications is exploited and malicious script is injected into the site content.

Cross-site scripting, or XSS, is a type of injection attack where a vulnerability in web applications is exploited that allows a threat actor to inject malicious script into the site’s content. When other users visit the page, their browsers execute the script because it is stored on the server and served as part of the site’s content. 

What is cross-site scripting?

When an attacker exploits a trusted site’s vulnerability and adds malicious code or script to that site, it is known as cross-site scripting, or XSS. Once a user engages with the script, the code executes and allows the attacker to take advantage of the user within the context of the original, trusted site.

Believe it or not, cross-site scripting has been around since 1999. But while it has roots in the last century, XSS is an old problem that persists today. In fact, according to OWASP (Open Worldwide Application Security Project), injection attacks like XSS and SQL injection rank #3 on their list of top 10 web application vulnerabilities. Talk about staying power.

What is an example of cross-site scripting?

One example of cross-site scripting is when an attacker places harmful script in the comments section of a web page, such as a forum or blog post. If the site does not have guardrails in place to prevent this type of malicious activity, then the script can put other users at risk of being attacked should they interact with the content.

What are the major types of cross-site scripting attacks?

The three most common types of XSS attacks are persistent, reflected, and DOM-based:

  • Persistent XSS: Persistent, or stored, XSS is a type of vulnerability which occurs when the untrusted or unverified user input is stored on a target server. This means that a persistent XSS attack is possible when the attacker exploits a vulnerable website or web application to inject malicious code, and this code is stored on a server so it will later automatically be served to other users who visit the web page.
  • Reflected XSS: Reflected, or non-persistent, XSS is a type of vulnerability which occurs when the untrusted or unverified user input is reflected off of a web application to the browser of the victim. An attacker has to trick the user into sending data to the target site, which is often done by sending the user a specially crafted malicious link. 
  • DOM-based XSS: Unlike persistent and reflected XSS, DOM-based XSS attacks make the victim’s browser itself the vulnerability. The malicious script is not stored nor is it delivered to the server. Instead, it exploits the client-side JavaScript to make use of the lack of proper sanitization. 

Consequences of cross-site scripting attacks

The consequences of an XSS attack depend on the type of attack and the intent of the attacker. Some possible outcomes include:

  • Manipulation of user experience: If a harmful script is running on a victim’s browser under the context of a trusted website, then the victim could see a different version of the website where the attacker can manipulate what is being experienced on the screen. This could allow the victim’s cookies to be transferred to the attacker, who may be able to then access sensitive information.
  • Malware: The attacker can choose to inject malware as part of the XSS attack, which could then escape the browser and run natively on the victim’s system.
  • Phishing: If a victim clicks on a harmful link as part of a phishing campaign, it could redirect the user to another site where malicious code can be executed. Phishing is the number one delivery vehicle for ransomware, a type of software specifically designed to hold a victim’s data hostage.
  • Browser control and data access: XSS can allow attackers to control the victim’s browser, access browser history, clipboard contents, and even scan and exploit intranet applications.

How to prevent XSS attacks

Developers can help prevent XSS attacks by validating user inputs. This includes inspecting and either rejecting or approving all user-generated content on their websites. They should also encode the output, so that symbols are converted into their plain-text counterparts. This avoids the possibility of harmful scripts making it onto the website and affecting its users. However, even with these best practices in place, vulnerabilities like injection attacks are still possible.

That’s why IT teams are engaging Managed Detection and Response (MDR) Services to prevent, detect, and respond to attacks like cross-site scripting. MDR protects endpoints from vulnerabilities 24/7, so IT teams never miss a threat. And MDR teams can monitor for suspicious traffic and analyze logs to flag possible signs of XSS attempts.