Summary
Streambert's Electron desktop application passes renderer-controlled URLs to
shell.openExternal without validating their protocols. If a renderer is
compromised, an attacker may cause the host system to open local files,
access resources through registered handlers, or launch supported scripts and
applications.
Affected context
The issue occurs in Streambert's Electron download-related IPC flow when the
open-external handler accepts a URL from the renderer process and forwards
it to the operating system through Electron's external-opening mechanism.
Risk depends on a renderer compromise or another condition that allows
attacker-controlled input to reach this handler, as well as the protocols and
custom handlers registered on the host system.
Exploit preconditions
- Attack surface: Electron renderer-to-main-process IPC
- Required access: Ability to control or influence a renderer process or
the data it submits to the IPC handler
- Trigger point: Processing a renderer-supplied URL through
shell.openExternal
- Why exploitation is possible: The handler does not restrict accepted
protocols, allowing file URIs and operating-system-specific custom schemes
to be forwarded to registered system handlers
Why this happens
The underlying bug is insufficient validation of security-sensitive external
resource identifiers. A renderer-controlled URL is treated as trusted input
even though opening it delegates behavior to the operating system and any
registered protocol handlers.
This maps primarily to CWE-20: Improper Input Validation. The related
CWE-749: Exposed Dangerous Method or Function is relevant because a
privileged application capability is exposed to renderer-controlled data
without an adequate policy boundary.
Potential impact
- An attacker may cause local files to be opened by an associated application.
- The host may access remote resources through registered protocol handlers.
- Custom schemes may launch scripts or applications supported by those
handlers.
- The desktop user's privacy, integrity, or system security could be
affected, depending on handler registration and user privileges.
General mitigation guidance
Mitigation generally focuses on reducing trust in renderer-supplied URLs and
constraining external-opening capabilities.
Common defensive patterns include:
- Allowlisting only explicitly required protocols, typically
httpsand
possibly http where business requirements justify it.
- Rejecting file URIs, custom schemes, malformed URLs, and URLs with
unexpected components before invoking external-opening APIs.
- Validating and normalizing URLs in the main process rather than relying
solely on renderer-side checks.
- Requiring explicit user confirmation for sensitive external actions.
- Limiting IPC handlers to narrowly defined operations and enforcing sender
and origin checks where applicable.
- Running the desktop application with least privilege and avoiding
unnecessary protocol-handler registrations.
How teams detect issues like this
Detection approaches can include:
- Static analysis rules identifying calls to
shell.openExternalor similar
APIs with renderer-controlled or otherwise untrusted arguments.
- Code review checks for missing protocol allowlists, URL normalization, and
main-process authorization at IPC boundaries.
- Tests covering file URIs, custom schemes, malformed URLs, and unexpected
URL components.
- Policy enforcement requiring security-sensitive IPC handlers to validate
sender context and constrain externally delegated actions.
- Automated application-security review tools can help identify dangerous
sink usage and missing input-validation controls.

