Summary
The asbplayer Chrome Extension version 1.14.0 contains a Cross-Site Scripting (XSS) vulnerability in its subtitle loading function, where crafted .srt subtitle files can cause arbitrary JavaScript execution.
When a victim loads a malicious subtitle file while using a streaming platform, attacker-controlled scripts run in the same-site context, potentially bypassing cross-origin protections and enabling unauthorized API calls and session data exfiltration.
Affected context
The vulnerability occurs in environments where users:
- Have the asbplayer Chrome Extension version 1.14.0 installed and active
- Load or import external subtitle files (e.g.,
.srt) into the extension while viewing a streaming service - Rely on the extension to render subtitles within or alongside the streaming platform context
Under these conditions, the extension's subtitle parsing and rendering logic can interpret malicious subtitle content as executable JavaScript in the active site's context.
Exploit preconditions
- Attack surface: The subtitle loading functionality of the asbplayer Chrome Extension when used with a streaming platform tab.
- Required access: Ability to supply or influence a subtitle file consumed by the victim (e.g., via download links, file sharing, or bundled subtitle archives).
- User interaction: A user must open the target streaming site with the extension active and explicitly load the crafted
.srtfile. - Trigger point: The moment the extension parses and renders the subtitle file for display.
- Why exploitation is possible: Subtitle content is not strictly validated or sanitized; untrusted file data is effectively embedded in a rendering context that executes within the same-site origin, allowing subtitle fields to be interpreted as script-capable content.
Why this happens
The underlying bug is an unsafe handling of untrusted subtitle files combined with inadequate content validation and output encoding.
The extension treats externally supplied .srt subtitle content as benign data but later processes it in a way that allows control over rendered markup or script-like constructs in a privileged page context.
This maps to CWE-434: Unrestricted Upload of File with Dangerous Type, where user-controlled files (here, subtitle files) are accepted and subsequently processed without sufficiently restricting their effective type or behavior, enabling script execution.
At an abstract level, any feature that ingests user-provided files and injects their contents into a web rendering surface without rigorous sanitization or contextual encoding can inadvertently create an XSS sink.
Potential impact
- Execution of arbitrary JavaScript within the active streaming platform's origin.
- Unauthorized same-site API requests, such as performing actions on behalf of the user.
- Theft of session-related data accessible to scripts in that origin (e.g., tokens, profile details, CSRF-protected resources).
- Manipulation of page content, including phishing overlays or deceptive UI within the streaming site.
- Potential pivot to other connected services if single sign-on or shared session mechanisms are in use.
General mitigation guidance
Effective mitigation focuses on treating subtitle files as untrusted input and constraining how they are interpreted and rendered:
- Enforce strict file parsing: accept only well-formed subtitle formats and reject any unexpected markup-like or scripting constructs.
- Apply robust output encoding: ensure all subtitle text is HTML-encoded (or otherwise contextually encoded) before being inserted into any DOM or rendered HTML surface.
- Avoid innerHTML or similar APIs: render subtitles using text-safe APIs that do not interpret markup, such as text nodes or safe templating frameworks.
- Introduce a strict content model: normalize subtitle content to a clearly defined subset (timing + plain text) and strip or reject control sequences and unsupported tags.
- Limit privilege: where possible, reduce the extension's access to page contexts and APIs so that even if text handling fails, the impact of script execution is constrained.
How teams detect issues like this
Organizations and maintainers can use a combination of static and dynamic techniques to detect similar vulnerabilities:
- Static code analysis: search for code paths where file-based input (subtitles or other media metadata) flows into DOM sinks (e.g.,
innerHTML,document.write,dangerouslySetInnerHTML) without encoding. - Security-focused code review: pay close attention to browser extension content scripts, injected UI overlays, and any logic that bridges external files with page contexts.
- Automated policy enforcement: integrate linting or security rules that flag unencoded insertion of user-controlled data into HTML, attributes, or script-capable contexts.
- Dynamic testing: fuzz subtitle parsing and rendering with specially crafted
.srtfiles containing HTML/JavaScript markers to observe whether they are rendered as text or executed.

