/

CVE-2026-75357

Severity:

CRITICAL RISK

(9.8)

Code Injection (CWE-94) in Bilibili Desktop v1.17.9

CVE-2026-75357

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

A critical code injection vulnerability in Bilibili Desktop may allow a remote attacker to execute arbitrary code through the bili-inject.js and bili-bridge.js components. The risk arises when attacker-controlled input reaches these components without adequate validation, isolation, or execution controls.

Affected context

The issue occurs in Bilibili Desktop deployments using the bili-inject.js and bili-bridge.js components. Exploitation depends on a reachable application interaction or message path that permits attacker-controlled data to be processed as executable code; the available description does not establish the exact delivery mechanism or required user interaction.

Exploit preconditions

  • Attack surface: Remote application functionality involving the affected JavaScript components
  • Required access: Ability to reach the relevant desktop application interaction or communication path
  • Trigger point: Processing of attacker-controlled input by bili-inject.js or bili-bridge.js
  • Why exploitation is possible: Input may be interpreted as code rather than treated strictly as data

Why this happens

The underlying bug is an unsafe code-generation or code-execution pattern in which externally influenced data can reach a JavaScript execution context. When input is not constrained to an expected data format and is instead interpreted dynamically, an attacker may influence program behavior or cause arbitrary code to run. This behavior maps to CWE-94, Improper Control of Generation of Code.

Potential impact

  • An attacker may execute arbitrary code with the privileges of the desktop application
  • Local files or application data could be accessed or modified
  • Credentials, session information, or other sensitive data may be exposed
  • The affected workstation could be used for persistence, malware deployment, or lateral movement

General mitigation guidance

Mitigation generally focuses on ensuring that untrusted input remains data and

cannot become executable JavaScript.

Common defensive patterns include:

  • Replacing dynamic evaluation and runtime code generation with fixed program logic
  • Applying strict allowlists and schema validation to messages and bridge arguments
  • Separating privileged operations from content-rendering or injection contexts
  • Enforcing strong context-specific output encoding and safe API boundaries
  • Limiting desktop application privileges and isolating high-risk renderer or bridge components
  • Restricting exposed bridge methods to the smallest required interface
  • Using secure-by-default content security and process-isolation controls

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for eval-like APIs, dynamic function construction, string-based script execution, and unsafe bridge exposure
  • Code review checks for renderer-to-main communication that accepts arbitrary commands or unvalidated arguments
  • Searches for JavaScript injection sinks receiving network, IPC, URL, or document-derived data
  • Runtime monitoring of unexpected child-process creation, script loading, or filesystem and credential access by the desktop application
  • Policy enforcement requiring schema validation, least-privilege bridge design, and security review for privileged JavaScript interfaces

Automated security scanning and code review tools may help identify these patterns during development.

Sources

SourceLink
github.comgithub.com/LeoWSY-hashblue/bilibili-desktop-ipc-origin-validation/blob/main/advisory.md
github.comgithub.com/LeoWSY-hashblue/cve-electron-2/blob/master/bilibili-desktop/cve.md

Frequently asked

questions

The description identifies a remote attacker as the threat source. Practical

exploitability depends on whether the attacker can reach the affected

component through an exposed application interaction, message channel, or

other supported input path.

The available information does not specify authentication or user-interaction

requirements. These conditions depend on how bili-inject.js and

bili-bridge.js receive and process remote input in a particular deployment.

Treat all externally influenced values as data, remove dynamic code execution,

validate bridge inputs against strict schemas, and isolate privileged

operations behind narrowly scoped interfaces.

Use secure application architecture, process isolation, least privilege,

restrictive content-security policies, static analysis for code-execution

sinks, and security-focused review of JavaScript bridge components.

Find out what's already
exploitable in your codebase.