---
title: "CAPEC-587: Cross Frame Scripting (XFS)"
url: https://radicalnotion.ai/capec/capec-587
type: capec
description: "This attack pattern combines malicious Javascript and a legitimate webpage loaded into a concealed iframe. The malicious Javascript is then able to interact with a legitimate webpage in a manner that is unknown to the user. This attack usually leverages some element of social engineering in that an attacker must convinces a user to visit a web page that the attacker controls."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-587: Cross Frame Scripting (XFS)

- **Abstraction:** Detailed
- **Status:** Draft
- **Typical severity:** High
- **CAPEC catalog version:** 3.9

## Description

This attack pattern combines malicious Javascript and a legitimate webpage loaded into a concealed iframe. The malicious Javascript is then able to interact with a legitimate webpage in a manner that is unknown to the user. This attack usually leverages some element of social engineering in that an attacker must convinces a user to visit a web page that the attacker controls.

## Prerequisites

- The user's browser must have vulnerabilities in its implementation of the same-origin policy. It allows certain data in a loaded page to originate from different servers/domains.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Data | Cross Frame Scripting allows an adversary to steal sensitive data from a legitimate site. |

## Mitigations

- Avoid clicking on untrusted links.
- Employ techniques such as frame busting, which is a method by which developers aim to prevent their site being loaded within a frame.

## Example instances

An adversary-controlled webpage contains malicious Javascript and a concealed iframe containing a legitimate website login (i.e., the concealed iframe would make it appear as though the actual legitimate website was loaded). When the user interacts with the legitimate website in the iframe, the malicious Javascript collects that sensitive information.

## Related weaknesses (CWE)

- [CWE-1021](https://radicalnotion.ai/cwe/cwe-1021): Improper Restriction of Rendered UI Layers or Frames

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-103](https://radicalnotion.ai/capec/capec-103) | Clickjacking |

## Taxonomy mappings

| Taxonomy | Entry | Id |
| --- | --- | --- |
| OWASP Attacks | Cross Frame Scripting | - |

## Frequently asked questions

### What is CAPEC-587?

This attack pattern combines malicious Javascript and a legitimate webpage loaded into a concealed iframe. The malicious Javascript is then able to interact with a legitimate webpage in a manner that is unknown to the user. This attack usually leverages some element of social engineering in that an attacker must convinces a user to visit a web page that the attacker controls.

### How do you prevent CAPEC-587?

Avoid clicking on untrusted links.

### What weaknesses does CAPEC-587 target?

CAPEC-587 exploits one CWE weakness: CWE-1021 (Improper Restriction of Rendered UI Layers or Frames).

### How severe is CAPEC-587?

MITRE rates CAPEC-587 as High severity.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/587.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-587). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
