thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Application & OT Security · Advanced

Cross-Site Script Inclusion (XSSI)

An attack in which a malicious page includes a target's authenticated script or JSON response via a script tag to read sensitive data.

Definition

Script tags are exempt from the same-origin policy, so dynamically generated JavaScript or JSONP containing user data can leak cross-site. Mitigations include not putting secrets in script responses, avoiding JSONP, requiring non-simple headers or tokens for data endpoints, X-Content-Type-Options: nosniff and SameSite cookies.

Example

A JSONP endpoint returning the user's profile is included by an attacker's page, which reads the data through its own callback.

Exam tip

Avoid JSONP; serve sensitive data only as JSON with proper content types.

Related terms