--- title: Attacks slug: Web/Security/Attacks page-type: guide sidebar: security --- In web security, an attack is a specific method an attacker uses to achieve their goal. For example, if their goal is to steal a user's data, a cross-site scripting (XSS) attack is one method they might use. A given attack may be countered by one or more mitigations: for example, XSS might be countered by properly sanitizing data and implementing a [content security policy](/en-US/docs/Web/HTTP/Guides/CSP). This page links to pages explaining how some common attacks work, and how they can be mitigated. - [Clickjacking](/en-US/docs/Web/Security/Attacks/Clickjacking) - : In a clickjacking attack, an attacker creates a decoy site which embeds the target site inside an {{htmlelement("iframe")}} element. It hides the `