#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Cross-Site Scripting (XSS)

What Is Cross-Site Scripting?

Cross-Site Scripting (XSS) is an attack where malicious scripts are injected into a trusted website, which then executes in the browser of anyone who visits the compromised page.

Types of XSS Attacks

TypeHow It Works
Stored XSSMalicious script is permanently saved on the target server
Reflected XSSMalicious script is reflected off a server via a crafted link
DOM-based XSSThe vulnerability exists in client-side JavaScript itself

What XSS Enables Attackers to Do

A successful XSS attack can let an attacker steal session cookies, redirect users to malicious sites, or perform actions on behalf of the victim without their knowledge.

Preventing XSS

Proper output encoding, input validation, and Content Security Policy (CSP) headers together form the core defense against XSS, ensuring user-supplied input is never treated as executable code by the browser.

SQL Injection and XSS both exploit application weaknesses - a very different, more direct approach is the brute force attack.

Ready to master Cybersecurity Training Course?

Join Uncodemy's hands-on training and build real-world cybersecurity skills with expert mentors.

Explore Course