---
title: "CAPEC-468: Generic Cross-Browser Cross-Domain Theft"
url: https://radicalnotion.ai/capec/capec-468
type: capec
description: "An attacker makes use of Cascading Style Sheets (CSS) injection to steal data cross domain from the victim's browser. The attack works by abusing the standards relating to loading of CSS: 1. Send cookies on any load of CSS (including cross-domain) 2. When parsing returned CSS ignore all data that does not make sense before a valid CSS descriptor is found by the CSS parser."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-468: Generic Cross-Browser Cross-Domain Theft

- **Abstraction:** Standard
- **Status:** Draft
- **Typical severity:** Medium
- **CAPEC catalog version:** 3.9

## Description

An attacker makes use of Cascading Style Sheets (CSS) injection to steal data cross domain from the victim's browser. The attack works by abusing the standards relating to loading of CSS: 1. Send cookies on any load of CSS (including cross-domain) 2. When parsing returned CSS ignore all data that does not make sense before a valid CSS descriptor is found by the CSS parser.

By having control of some text in the victim's domain, the attacker is able to inject a seemingly valid CSS string. It does not matter if this CSS string is preceded by other data. The CSS parser will still locate the CSS string. If the attacker is able to control two injection points, one before the cross domain data that the attacker is interested in receiving and the other one after, the attacker can use this attack to steal all of the data in between these two CSS injection points when referencing the injected CSS while performing rendering on the site that the attacker controls. When rendering, the CSS parser will detect the valid CSS string to parse and ignore the data that "does not make sense". That data will simply be rendered. That data is in fact the data that the attacker just stole cross domain. The stolen data may contain sensitive information, such CSRF protection tokens.

## Prerequisites

- No new lines can be present in the injected CSS stringProper HTML or URL escaping of the " and ' characters is not presentThe attacker has control of two injection points: pre-string and post-string

## Skills required

- **High:** Ability to craft a CSS injection

## Resources required

- Attacker controlled site/page to render a page referencing the injected CSS string

## Mitigations

- Design: Prior to performing CSS parsing, require the CSS to start with well-formed CSS when it is a cross-domain load and the MIME type is broken. This is a browser level fix.
- Implementation: Perform proper HTML encoding and URL escaping

## Related weaknesses (CWE)

- [CWE-149](https://radicalnotion.ai/cwe/cwe-149): Improper Neutralization of Quoting Syntax
- [CWE-177](https://radicalnotion.ai/cwe/cwe-177): Improper Handling of URL Encoding (Hex Encoding)
- [CWE-707](https://radicalnotion.ai/cwe/cwe-707): Improper Neutralization
- [CWE-838](https://radicalnotion.ai/cwe/cwe-838): Inappropriate Encoding for Output Context

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-242](https://radicalnotion.ai/capec/capec-242) | Code Injection |

## Frequently asked questions

### What is CAPEC-468?

An attacker makes use of Cascading Style Sheets (CSS) injection to steal data cross domain from the victim's browser. The attack works by abusing the standards relating to loading of CSS: 1. Send cookies on any load of CSS (including cross-domain) 2. When parsing returned CSS ignore all data that does not make sense before a valid CSS descriptor is found by the CSS parser.

### How do you prevent CAPEC-468?

Design: Prior to performing CSS parsing, require the CSS to start with well-formed CSS when it is a cross-domain load and the MIME type is broken. This is a browser level fix.

### What weaknesses does CAPEC-468 target?

CAPEC-468 exploits 4 CWE weaknesses: CWE-149 (Improper Neutralization of Quoting Syntax), CWE-177 (Improper Handling of URL Encoding (Hex Encoding)), CWE-707 (Improper Neutralization) and CWE-838 (Inappropriate Encoding for Output Context).

### How severe is CAPEC-468?

MITRE rates CAPEC-468 as Medium severity.

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

---

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