XSS attack

abbreviation

Cross-Site Scripting

An XSS (Cross-Site Scripting) attack is a type of cyberattack where hackers inject malicious scripts into web pages viewed by other users. These scripts can steal data, hijack sessions, or deface websites.

It works by exploiting vulnerabilities in web applications that don’t properly validate user input. For example, if a website allows users to post comments without filtering code, an attacker could inject a script that runs in the browser of anyone viewing the page.

For developers, XSS attacks require strict input validation, output encoding, and security headers like Content Security Policy (CSP). A real-world example: In 2021, a major e-commerce site suffered an XSS attack that stole 10,000 user credentials because it failed to sanitize user-generated content.

A hacker injects a script into a forum post, and when users click 'Like,' their session cookies are stolen.

In other languages

Découvrez nos autres services

ElpisIA, c’est tout un univers — explorez nos autres services.