/

CVE-2026-62848

Severity:

HIGH RISK

(7.3)

Unsafe Deserialization (CWE-502) in Metalama VS Integration

CVE-2026-62848

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502, CWE-913

Impact:

Same-user arbitrary code execution

Severity:

HIGH RISK

(7.3)

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

CVE-2026-62848 is an unsafe deserialization vulnerability in Metalama's Windows Visual Studio integration, where local named-pipe messages can cause attacker-controlled CLR types to be instantiated. A same-user local process that can write to the predictable pipe may achieve arbitrary code execution within an affected Visual Studio process, although the issue does not normally cross the Windows user boundary.

CVE-2026-62848 is an unsafe deserialization vulnerability in Metalama's Windows Visual Studio integration, where local named-pipe messages can cause attacker-controlled CLR types to be instantiated. A same-user local process that can write to the predictable pipe may achieve arbitrary code execution within an affected Visual Studio process, although the issue does not normally cross the Windows user boundary.

Affected context

The vulnerability occurs in the Windows Visual Studio integration when communication between Visual Studio, out-of-process Roslyn analysis, and CodeLens processes uses local named pipes without sufficiently restricting deserialized types. Affected deployments include integrations that use unsafe Newtonsoft.Json or typeless MessagePack handling; command-line and MSBuild-only builds generally do not use this communication channel. Default Windows pipe permissions typically limit access to processes running as the same logged-in user.

The vulnerability occurs in the Windows Visual Studio integration when communication between Visual Studio, out-of-process Roslyn analysis, and CodeLens processes uses local named pipes without sufficiently restricting deserialized types. Affected deployments include integrations that use unsafe Newtonsoft.Json or typeless MessagePack handling; command-line and MSBuild-only builds generally do not use this communication channel. Default Windows pipe permissions typically limit access to processes running as the same logged-in user.

Exploit preconditions

  • Attack surface: Local Windows named-pipe communication used by the Visual Studio integration
  • Required access: Ability to run a same-user local process that can write to the affected pipe
  • Trigger point: Processing a crafted message received by the Visual Studio integration
  • Why exploitation is possible: Deserialization permits wire-supplied CLR types or typeless objects to be instantiated without an effective allow-list
  • Boundary limitation: Default pipe ACLs generally prevent lower-privileged users from writing to another user's pipe
  • Attack surface: Local Windows named-pipe communication used by the Visual Studio integration
  • Required access: Ability to run a same-user local process that can write to the affected pipe
  • Trigger point: Processing a crafted message received by the Visual Studio integration
  • Why exploitation is possible: Deserialization permits wire-supplied CLR types or typeless objects to be instantiated without an effective allow-list
  • Boundary limitation: Default pipe ACLs generally prevent lower-privileged users from writing to another user's pipe

Why this happens

The underlying flaw is unsafe deserialization of attacker-influenced interprocess messages. JSON configurations using broad type-name handling and MessagePack configurations using typeless object resolution can treat serialized type metadata as an instruction to construct arbitrary runtime types. A serialization binder that only remaps assembly names does not provide sufficient protection when it still resolves arbitrary wire-supplied types. This behavior maps primarily to CWE-502: Deserialization of Untrusted Data, with CWE-913: Improper Control of Dynamically-Managed Code Resources also describing the insufficient restriction of dynamically selected types.

The underlying flaw is unsafe deserialization of attacker-influenced interprocess messages. JSON configurations using broad type-name handling and MessagePack configurations using typeless object resolution can treat serialized type metadata as an instruction to construct arbitrary runtime types. A serialization binder that only remaps assembly names does not provide sufficient protection when it still resolves arbitrary wire-supplied types. This behavior maps primarily to CWE-502: Deserialization of Untrusted Data, with CWE-913: Improper Control of Dynamically-Managed Code Resources also describing the insufficient restriction of dynamically selected types.

Potential impact

  • A same-user local process may execute arbitrary code inside the affected Visual Studio process
  • Confidentiality of data accessible to Visual Studio may be compromised
  • Project files, source code, credentials, or development artifacts could be modified
  • Visual Studio availability may be disrupted
  • Development workflows or build-related activities could be tampered with
  • The vulnerability could support local persistence within the user's development environment
  • A same-user local process may execute arbitrary code inside the affected Visual Studio process
  • Confidentiality of data accessible to Visual Studio may be compromised
  • Project files, source code, credentials, or development artifacts could be modified
  • Visual Studio availability may be disrupted
  • Development workflows or build-related activities could be tampered with
  • The vulnerability could support local persistence within the user's development environment

General mitigation guidance

Mitigation generally focuses on eliminating polymorphic deserialization of untrusted pipe messages and enforcing strict type boundaries.

Common defensive patterns include:

  • Use schema-bound serializers that do not honor arbitrary wire-supplied type metadata
  • Configure explicit allow-lists for every deserializable message type
  • Validate message structure, length, role, and protocol state before object construction
  • Prefer narrowly defined data-transfer objects over general-purpose runtime object graphs
  • Preserve restrictive named-pipe ACLs and avoid broadening same-user or cross-user access
  • Remove or migrate retired integrations that remain exposed to unsafe communication paths
  • Apply least privilege to Visual Studio extensions and related helper processes
  • Monitor extension installation and interprocess communication policy in managed development environments

Mitigation generally focuses on eliminating polymorphic deserialization of untrusted pipe messages and enforcing strict type boundaries.

Common defensive patterns include:

  • Use schema-bound serializers that do not honor arbitrary wire-supplied type metadata
  • Configure explicit allow-lists for every deserializable message type
  • Validate message structure, length, role, and protocol state before object construction
  • Prefer narrowly defined data-transfer objects over general-purpose runtime object graphs
  • Preserve restrictive named-pipe ACLs and avoid broadening same-user or cross-user access
  • Remove or migrate retired integrations that remain exposed to unsafe communication paths
  • Apply least privilege to Visual Studio extensions and related helper processes
  • Monitor extension installation and interprocess communication policy in managed development environments

How teams detect issues like this

High-level detection can include:

  • Static analysis for Newtonsoft.Json TypeNameHandling settings that permit broad polymorphism
  • Searches for TypeNameHandling.All, typeless MessagePack resolvers, and unrestricted BindToType implementations
  • Code review checks for deserialization of named-pipe or other IPC input before authentication, schema validation, or type allow-list enforcement
  • Tests that submit unknown, unexpected, or disallowed type metadata and verify rejection
  • Policy enforcement preventing extensions from creating overly permissive local IPC endpoints
  • Inventory reviews identifying active, retired, or migrated Visual Studio integrations that use the affected channel
  • Neutral automated code-review or software-composition tools may help identify unsafe serializer configurations

High-level detection can include:

  • Static analysis for Newtonsoft.Json TypeNameHandling settings that permit broad polymorphism
  • Searches for TypeNameHandling.All, typeless MessagePack resolvers, and unrestricted BindToType implementations
  • Code review checks for deserialization of named-pipe or other IPC input before authentication, schema validation, or type allow-list enforcement
  • Tests that submit unknown, unexpected, or disallowed type metadata and verify rejection
  • Policy enforcement preventing extensions from creating overly permissive local IPC endpoints
  • Inventory reviews identifying active, retired, or migrated Visual Studio integrations that use the affected channel
  • Neutral automated code-review or software-composition tools may help identify unsafe serializer configurations

Sources

SourceLink
github.comgithub.com/metalama/Metalama/commit/5b4ced29f2b25631cc2e44d05b0fd5fe838b6cbe
github.comgithub.com/metalama/Metalama/commit/d97f52e1b53ffe4176b2b05c56ffdf1ccd2f53a9
github.comgithub.com/metalama/Metalama/pull/1651
github.comgithub.com/metalama/Metalama/releases/tag/release/2025.1.18
github.comgithub.com/metalama/Metalama/releases/tag/release/2026.0.25
github.comgithub.com/metalama/Metalama/releases/tag/release/2026.1.19
github.comgithub.com/metalama/Metalama/security/advisories/GHSA-h26j-4vp7-x9w2

Frequently asked

questions

Generally, no. Exploitation requires a local process that can write to the affected named pipe, and default Windows ACLs usually restrict that capability to the same logged-in user.

No elevated privileges are normally required if an attacker can run code as the same user and communicate with the integration. The issue typically does not provide a direct cross-user privilege escalation.

Replace unrestricted polymorphic or typeless deserialization with schema-bound parsing and an explicit allow-list of permitted message types. IPC access controls should remain restrictive.

Treat local IPC messages as untrusted input, avoid serializer features that instantiate wire-supplied types, validate messages before object construction, and include IPC and extension inventories in security reviews.

Generally, no. Exploitation requires a local process that can write to the affected named pipe, and default Windows ACLs usually restrict that capability to the same logged-in user.

No elevated privileges are normally required if an attacker can run code as the same user and communicate with the integration. The issue typically does not provide a direct cross-user privilege escalation.

Replace unrestricted polymorphic or typeless deserialization with schema-bound parsing and an explicit allow-list of permitted message types. IPC access controls should remain restrictive.

Treat local IPC messages as untrusted input, avoid serializer features that instantiate wire-supplied types, validate messages before object construction, and include IPC and extension inventories in security reviews.

Find out what's already
exploitable in your codebase.