SiteShadow
Back to vulnerability library

CWE-1021 Improper Restriction of Rendered UI Layers

What this means

SiteShadow flagged a UI that can be embedded/overlaid in ways the site doesn't intend (commonly via framing/overlays), which can enable clickjacking or other UI manipulation.

Why it matters

UI layer manipulation can mislead users or enable clickjacking.

Safer examples

1) Block framing with CSP (recommended)

// Express example
app.use((req, res, next) => {
  res.setHeader("Content-Security-Policy", "frame-ancestors 'none'");
  next();
});

2) Add legacy X-Frame-Options

app.use((req, res, next) => {
  res.setHeader("X-Frame-Options", "DENY");
  next();
});

3) Scope exceptions narrowly

If you must allow embedding (e.g., in your own admin portal), use frame-ancestors 'self' https://trusted.example and keep the allowlist tight.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage