# CVE-2026-49241: Angular: Multiple Remote Code Execution Vulnerabilities in Angular Language Service VS Code Extension

> Attackers can execute arbitrary code by tricking developers into opening a malicious repository that loads a crafted TypeScript SDK via the Angular Language Service extension.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 22 Jun 2026
- **Updated:** 23 Jun 2026
- **Also known as:** GHSA-ccq4-xmxr-8hcq, UBUNTU-CVE-2026-49241

## What is CVE-2026-49241?

CVE-2026-49241 is a high-severity code injection vulnerability in angular, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

The Angular Language Service VS Code Extension provides a rich editing experience for Angular templates. Prior to 21.2.4, the client-side Angular Language Service VS Code extension reads the custom TypeScript SDK paths typescript.tsdk and js/ts.tsdk.path directly from workspace configurations (.vscode/settings.json) without verifying VS Code Workspace Trust state or asking for user consent (located in client/src/client.ts). The client-side extension then passes the parsed settings path as a command-line argument (--tsdk) to the background Node.js language server process. During server initialization, the background language server resolves and dynamically imports (via standard Node.js require()) the module library tsserverlibrary.js relative to the workspace-specified custom directory path. An attacker can exploit this behavior by committing a repository containing a local malicious tsserverlibrary.js script inside a custom folder, and a crafted .vscode/settings.json file pointing to that folder. When a developer opens the repository folder in VS Code, the extension automatically attempts to initialize and load the server, which dynamically resolves, loads, and executes the malicious script silently in the background. This vulnerability is fixed in 21.2.4.

Weakness: CWE-94 (Improper Control of Generation of Code), CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-494 (Download of Code Without Integrity Check), CWE-427 (Uncontrolled Search Path Element)

## Which versions are affected by CVE-2026-49241?

It affects 1 product.


Products: Angular Angular Language Service.

## How do I fix CVE-2026-49241?

No fix has been published for CVE-2026-49241 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-49241 being exploited?

There is no known exploitation of CVE-2026-49241 in the wild and no public exploit code.

## Other vulnerabilities in angular

- [CVE-2026-50178](https://insights.sbomify.com/CVE-2026-50178/): Angular: Remote Code Execution via JSDoc Hover Command Injection in VS Code Angular Language Service Extension (high 8.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-49241 and fix it if it is affected.

What it is: CVE-2026-49241 is a high-severity code injection vulnerability in angular, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-49241 in the wild and no public exploit code.

Affected product: angular. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-49241/ (Markdown: https://insights.sbomify.com/CVE-2026-49241/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-49241
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-49241
- OSV: https://osv.dev/vulnerability/CVE-2026-49241

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-49241/
Summaries are generated and may contain mistakes; the official description above is the record.
