Summary
A stored cross-site scripting vulnerability in the dashboards-observability plugin for OpenSearch Dashboards allows an authenticated user with saved-object write permissions to upload an asset containing arbitrary web content. When other users view or interact with the affected content, JavaScript may execute in their browser sessions, potentially exposing data or enabling actions with their privileges.
Affected context
The issue occurs in OpenSearch Dashboards deployments using the dashboards-observability plugin where saved assets can contain or reference web content and are rendered in users' browser sessions. Risk depends on the attacker having authenticated write access to saved objects and on other users viewing or loading the affected asset.
Exploit preconditions
- Attack surface: OpenSearch Dashboards saved-object and asset handling functionality
- Required access: An authenticated account with permission to write saved objects
- Trigger point: A victim's browser loads or renders the attacker-controlled saved asset
- Why exploitation is possible: The plugin does not sufficiently validate or constrain uploaded web content before it is presented in a browser context trusted by other users
Why this happens
The vulnerability results from improper validation and handling of user-controlled web content in saved assets. Content that can include executable browser markup or script is accepted and later rendered without adequate output encoding, sanitization, or isolation. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.
Potential impact
- A malicious user may execute JavaScript in another user's dashboard session
- An attacker could access information available to the victim's browser session
- Unauthorized actions could be performed with the victim's privileges
- Session data or dashboard content could be exposed or altered
- Administrative users could be targeted, increasing the impact of successful exploitation
General mitigation guidance
Mitigation generally focuses on treating saved assets and uploaded content as untrusted data throughout their lifecycle.
Common defensive patterns include:
- Applying strict allowlist-based validation to uploaded asset types and content
- Using context-appropriate output encoding and robust sanitization before rendering
- Avoiding direct insertion of untrusted content into active browser contexts
- Isolating user-controlled content through appropriate browser and content-security boundaries
- Restricting saved-object write permissions according to least privilege
- Requiring explicit trust controls for content that must support limited active behavior
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis rules for unsafe HTML insertion, dynamic script execution, and insufficient sanitization
- Code review checks for saved-object content that reaches browser rendering sinks
- Tests that submit encoded, malformed, and script-like content to asset upload and display paths
- Monitoring for unexpected saved-object creation, modification, or unusual asset content
- Content Security Policy reporting and browser telemetry for blocked or unexpected script execution
- Automated application security testing focused on authenticated stored-XSS workflows

