CVE-2026-50178

Angular: Remote Code Execution via JSDoc Hover Command Injection in VS Code Angular Language Service Extension

Published Jun 22, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
The Angular Language Service VS Code Extension provides a rich editing experience for Angular templates. the client-side Angular Language Service VS Code extension configures the tooltip Markdown renderer with the isTrusted: true option (located in client/src/client.ts). This setting instructs VS Code to trust all rendered content it receives, which enables active elements such as command: URIs. However, the background Angular Language Server process fails to escape or sanitize brackets, raw links, and control characters from JSDoc strings before forwarding the hover Markdown content (located in server/src/handlers/hover.ts and server/src/text_render.ts). An attacker can leverage this behavior by crafting a project TypeScript or JavaScript file (or a third-party npm package dependency) containing a malicious JSDoc tooltip with an embedded active command link. When a developer hovers over the target symbol to render the tooltip and clicks the malicious link, the IDE executes the command sequence directly on the developer's host machine. Prior to 21.2.4, This vulnerability is fixed in 21.2.4.

Analysis

AI-generated

Technical impact

The Angular Language Service VS Code Extension incorrectly configures the tooltip Markdown renderer with the isTrusted: true option, which allows active command URIs to be executed directly within the editor. Because the server fails to escape or sanitize brackets, raw links, and control characters from JSDoc tooltip strings, an attacker can embed a malicious command link into a TypeScript or JavaScript file—either within a project or a third‑party npm dependency. When a developer hovers over that symbol and clicks the malicious link, the IDE runs the command sequence on the host machine, resulting in arbitrary code execution on the developer’s local system. The vulnerability is a combination of cross‑site scripting (CWE‑79) and code injection (CWE‑94).

Affected Systems

Angular’s Angular Language Service VS Code Extension, used by projects that include angular:Angular.ng-template and angular:angular packages. Any version prior to 21.2.4 is affected; the fix is included in 21.2.4 and later releases.

Risk and Exploitability

The CVSS score of 8.7 signals high severity. Because the EPSS score is not available, no quantitative exploitation probability is given, and the vulnerability is not listed in the CISA KEV catalog. The exploit requires a developer to open a malicious Angular project in VS Code, hover over a symbol, and click the injected command link. It is not remotely exploitable over the network; control is limited to the local environment of the user who opens the vulnerable project. Nonetheless, any developer who conducts normal editing tasks with the extension is at risk if they interact with suspicious tooltip content.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Angular Language Service VS Code Extension to version 21.2.4 or newer.
  • If an upgrade is not immediately possible, disable or uninstall the extension while the issue is unresolved.
  • Ensure that only trusted source code is opened in VS Code, and avoid clicking command links in hover tooltips from unfamiliar projects.

Generated by OpenCVE AI on June 22, 2026 at 16:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Angular
Angular angular
Angular angular.ng-template
Vendors & Products Angular
Angular angular
Angular angular.ng-template
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The Angular Language Service VS Code Extension provides a rich editing experience for Angular templates. the client-side Angular Language Service VS Code extension configures the tooltip Markdown renderer with the isTrusted: true option (located in client/src/client.ts). This setting instructs VS Code to trust all rendered content it receives, which enables active elements such as command: URIs. However, the background Angular Language Server process fails to escape or sanitize brackets, raw links, and control characters from JSDoc strings before forwarding the hover Markdown content (located in server/src/handlers/hover.ts and server/src/text_render.ts). An attacker can leverage this behavior by crafting a project TypeScript or JavaScript file (or a third-party npm package dependency) containing a malicious JSDoc tooltip with an embedded active command link. When a developer hovers over the target symbol to render the tooltip and clicks the malicious link, the IDE executes the command sequence directly on the developer's host machine. Prior to 21.2.4, This vulnerability is fixed in 21.2.4.
Title Angular: Remote Code Execution via JSDoc Hover Command Injection in VS Code Angular Language Service Extension
Weaknesses CWE-79
CWE-94
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 22, 2026, 4:04 PM
Reserved
Jun 3, 2026, 10:05 PM
Status
Analyzed
Published
Jun 22, 2026, 4:16 PM
Modified
Jun 26, 2026, 2:57 AM