Skip to content

Bug: Admin live-preview iframe missing sandbox attribute — XSS escalation risk #314

Description

@Siddh2024

Summary

In public/admin.html line 428, the live preview <iframe> loads /me without a sandbox attribute. If /me is compromised (e.g., via stored XSS), an attacker gets full access to the admin panel's DOM, cookies, and localStorage.

Details

  • File: public/admin.html line 428
  • <iframe id="livePreviewIframe" ... src="/me" title="Live Profile Preview"></iframe>
  • No sandbox attribute restricts what the iframe can do
  • If the profile page has any XSS vulnerability, the attacker's script executes in the admin context

Impact

Privilege escalation via iframe — a stored XSS in a user profile becomes a full admin panel compromise.

Suggested Fix

Add sandbox="allow-scripts" to restrict iframe capabilities while still allowing preview rendering.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions