/

CVE-2026-26266

Severity:

CRITICAL RISK

(9.3)

XSS in AliasVault Web Client Email Renderer

CVE-2026-26266

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting leading to session hijacking and full account compromise

Severity:

CRITICAL RISK

(9.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

AliasVault Web Client versions 0.25.3 and below contain a stored cross-site scripting vulnerability in the email rendering feature, where email HTML is rendered directly via an iframe srcdoc without isolation.

An attacker can send a crafted email containing malicious JavaScript to any AliasVault email alias; when the recipient views it in the web client, the script executes in the application's origin, enabling account takeover and other critical impacts.

Affected context

The vulnerability affects AliasVault Web Client deployments at versions 0.25.3 and below that allow users to view rich HTML emails associated with their aliases.

The issue appears when the client renders received emails using an iframe's srcdoc attribute without applying any HTML/JavaScript sanitization, sandboxing, or origin isolation.

In this context, untrusted email content is treated as trusted application content, causing user-supplied scripts from emails to execute with the same origin as the main application.

Exploit preconditions

  • Attack surface: The web-based email viewing interface of the AliasVault Web Client.
  • Required access: Ability to send an email to any AliasVault alias (no need for an account on the victim's instance).
  • Victim interaction: A logged-in user must open or preview the malicious email in the web client so that the email body is rendered.
  • Trigger point: Rendering of the email content into an iframe via srcdoc without sanitization or sandbox attributes.
  • Why exploitation is possible: The email HTML is rendered in the same origin as the application, with no content sanitization or iframe sandboxing, allowing arbitrary JavaScript in the email to run with full access to the application's DOM, cookies (if accessible to JavaScript), local storage, and other web APIs.

Why this happens

The underlying issue is a classic stored cross-site scripting flaw where untrusted content is rendered as active HTML/JavaScript in the browser.

Incoming emails, which are inherently untrusted and attacker-controlled, are inserted into an iframe using the srcdoc attribute without:

  • Stripping or neutralizing script elements and dangerous attributes, and
  • Enforcing sandbox policies or origin separation that would restrict script execution.

This behavior maps directly to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), where user-controlled data is incorporated into a web page without appropriate sanitization or output encoding.

Because srcdoc content inherits the embedding page's origin when not sandboxed, the malicious script runs with the same privileges as the main application.

Potential impact

  • Theft of authentication tokens or session information that may allow account takeover.
  • Access to and exfiltration of stored passwords, email aliases, and other sensitive vault data available in the web client context.
  • Modification of user settings, creation or deletion of aliases, and manipulation of security-related configurations.
  • Phishing overlays or deceptive UI elements to trick users into revealing master passwords or MFA tokens.
  • Use of the victim's session to perform actions on other linked services (e.g., integrations or synced devices).
  • Pivoting to further application vulnerabilities by abusing the authenticated context and APIs.

General mitigation guidance

Mitigation patterns focus on treating all email content as untrusted and limiting its execution capabilities:

  • Apply robust HTML sanitization on email bodies before rendering, removing scripts, event handlers, javascript: URLs, and other active content.
  • Prefer rendering emails in a sandboxed iframe with restrictive flags (e.g., disallowing scripts and top-level navigation) so that any residual active content cannot affect the application.
  • Avoid using srcdoc for untrusted HTML when it would share origin with the main application; instead, render from a distinct, locked-down origin or use text-only/limited markup rendering.
  • Enforce a default-deny approach to embedded content: strip or disable forms, iframes, and scriptable components unless explicitly required and safely constrained.
  • Follow a least-privilege design in the client: minimize how much sensitive state and capability is exposed to the DOM that renders external content.

How teams detect issues like this

Effective detection often combines code-level review with behavioral testing:

  • Static analysis: Scan the codebase for direct insertion of untrusted email content into HTML sinks (innerHTML, template literals, srcdoc, document.write, or React/Vue raw HTML APIs) without passing through a sanitization function.
  • Security code review: Examine the email rendering pipeline, confirming that all inbound HTML passes through vetted sanitization libraries and that iframe usages for untrusted content include appropriate sandbox attributes and, where possible, origin separation.
  • Automated tests: Add regression tests that attempt to render benign XSS probes in emails and assert that the scripts never execute (e.g., CSP violation logs, test hooks).
  • Runtime monitoring: Configure Content Security Policy (CSP) with reporting to flag unexpected inline script execution related to email views, and integrate these reports into security monitoring.
  • Policy enforcement: Introduce internal guidelines or pre-commit hooks that flag or block new uses of dynamic HTML rendering APIs for untrusted data.

Sources

SourceLink
github.comgithub.com/aliasvault/aliasvault/commit/382e2e96fa502891638a48404f6d82dc972ab481
github.comgithub.com/aliasvault/aliasvault/releases/tag/0.26.0
github.comgithub.com/aliasvault/aliasvault/security/advisories/GHSA-f65p-p65r-g53q

Frequently asked

questions

Yes. Any attacker who can send an email to a victim's AliasVault alias can exploit this issue remotely, as long as the victim uses a vulnerable web client version and opens the malicious email.

The attacker does not need authenticated access to AliasVault; the only requirement is the ability to deliver an email to a target alias. Exploitation occurs when an authenticated user views the crafted email in the vulnerable web client.

The most robust fix pattern is to treat email HTML as untrusted data: sanitize it using a well-maintained HTML sanitizer, render it in a locked-down sandboxed iframe or separate origin, and avoid executing any scripts or inline event handlers originating from the email content.

Establish a consistent secure-rendering strategy for all untrusted content, enforce use of sanitization libraries and sandboxing for external HTML, adopt secure coding standards around XSS, and incorporate automated checks and security reviews into the development lifecycle for any feature that displays user or third-party generated HTML.

Find out what's already
exploitable in your codebase.