CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-120792

CVE-2026-120792: Local Information Disclosure via Temporary File Logging in Microsoft .NET Aspire CLI

Alon Barad
Alon Barad
Software Engineer

Nov 11, 2026·9 min read·3 visits

Executive Summary (TL;DR)

Microsoft .NET Aspire CLI versions prior to 13.6.5 write diagnostic logs containing internal repository paths and up to 200 characters of raw MCP agent configuration files to a world-readable static file (`aspire-deprecated-scan.log`) in the OS temporary directory. Local unprivileged users on shared hosts can read this log to extract API tokens and credentials.

CVE-2026-120792 is a high-severity local information disclosure vulnerability in the Microsoft .NET Aspire CLI (Aspire.Cli) affecting versions 13.5.4 prior to 13.6.5. The flaw stems from the insertion of sensitive information into a shared temporary log file (CWE-532) combined with insecure temporary file creation (CWE-377) within the DeprecatedMcpCommandScanner component. During agent configuration scanning, the CLI unconditionally appends internal workspace paths and the first 200 characters of Model Context Protocol (MCP) agent configuration files to a statically named file in the system temporary directory. On multi-user systems, unprivileged local users can read this file to harvest API keys, authentication tokens, and internal service endpoints.

Vulnerability Overview

Microsoft .NET Aspire includes a command-line interface (Aspire.Cli) designed to manage cloud-native application orchestration, developer workflows, and AI agent integrations via the Model Context Protocol (MCP). A subcomponent of this tool, DeprecatedMcpCommandScanner, inspects local developer workspaces to identify legacy MCP startup commands (aspire mcp start) within agent configuration files and offers automated migration paths.

In .NET Aspire CLI versions 13.5.4 through < 13.6.5, the DeprecatedMcpCommandScanner component contains residual diagnostic logging code that operates automatically during agent initialization workflows (such as aspire agent init). This diagnostic logic writes operational telemetry directly to a hardcoded filename, aspire-deprecated-scan.log, located inside the operating system's default temporary directory (Path.GetTempPath()).

Tracked as CVE-2026-120792, this vulnerability represents a combination of CWE-532 (Insertion of Sensitive Information into Log File) and CWE-377 (Insecure Temporary File). Because the scanner logs up to the first 200 characters of every discovered MCP configuration file without redaction or access control restrictions, any sensitive secrets stored near the beginning of those JSON files are exposed to local users on the same machine.

Root Cause Analysis

The root cause of CVE-2026-120792 is the inclusion of non-production file-based debug logging inside the DeprecatedMcpCommandScanner.ScanAsync method in src/Aspire.Cli/Agents/DeprecatedMcpCommandScanner.cs. Rather than utilizing the application's configured ILogger pipeline, the method resolves a static file path by combining Path.GetTempPath() with the literal string "aspire-deprecated-scan.log".

When ScanAsync iterates over known agent configuration paths (s_configLocations, which includes configurations for Cursor, VS Code, Claude, and GitHub Copilot), it checks for the existence of each file on disk. Upon locating a valid configuration file, the method reads the entire file into memory using File.ReadAllText(configPath) and immediately writes a 200-character substring of the raw file content to the temporary log file via File.AppendAllText.

This implementation introduces two distinct security flaws at the operating system level:

  1. World-Readable File Permissions in Shared Directories: On Unix-like systems (Linux and macOS), Path.GetTempPath() resolves to /tmp or /var/tmp. When .NET's File.AppendAllText creates a new file, it applies default permissions governed by the process umask (standardly 0022, resulting in 0644 or -rw-r--r-- permissions). Consequently, the log file is readable by any local user account on the host.
  2. Predictable File Naming Without Exclusivity Checks: Because File.AppendAllText opens the target path without FileMode.CreateNew (O_CREAT | O_EXCL), the operation is vulnerable to pre-creation and symlink manipulation in shared temporary directories that lack fs.protected_symlinks kernel protections.

> [!NOTE] > Model Context Protocol (MCP) configuration files are compact JSON documents that define server execution parameters, headers, and environment blocks ("env": { "API_KEY": "..." }). The first 200 characters of these files routinely encapsulate primary authentication credentials and internal endpoint URIs.

Code Analysis

The vulnerability resides in src/Aspire.Cli/Agents/DeprecatedMcpCommandScanner.cs. In vulnerable versions, the ScanAsync method interleaves standard _logger.LogDebug calls with nine separate calls to File.AppendAllText targeting debugPath.

Vulnerable Code Path

public Task ScanAsync(AgentEnvironmentScanContext context, CancellationToken cancellationToken)
{
    _logger.LogDebug("Scanning for deprecated MCP command usage in agent configurations");
 
    // VULNERABILITY: Hardcoded path in shared system temporary directory
    var debugPath = Path.Combine(Path.GetTempPath(), "aspire-deprecated-scan.log");
    File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}] Scanning context.RepositoryRoot: {context.RepositoryRoot.FullName}\n");
 
    foreach (var location in s_configLocations)
    {
        var configPath = Path.Combine(context.RepositoryRoot.FullName, location.RelativePath);
        File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}] Checking {location.AgentName}: {configPath}\n");
 
        if (!File.Exists(configPath))
        {
            File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> File does not exist\n");
            continue;
        }
 
        File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> File EXISTS!\n");
 
        try
        {
            var content = File.ReadAllText(configPath);
            // VULNERABILITY: Raw configuration content (up to 200 chars) written to shared log
            File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> Content: {content.Substring(0, Math.Min(200, content.Length))}\n");
            var config = JsonNode.Parse(content)?.AsObject();
            // ...

Patch Analysis

In commit c408ec5bf44e43203c278990a43aea93145248f3, Microsoft remediated the issue by removing all debugPath declarations and File.AppendAllText invocations from DeprecatedMcpCommandScanner.cs. Exception handling blocks were preserved and continue to use the structured _logger.LogDebug interface, which does not write to shared temporary files by default.

@@ -41,37 +41,26 @@ public Task ScanAsync(AgentEnvironmentScanContext context, CancellationToken can
     {
         _logger.LogDebug("Scanning for deprecated MCP command usage in agent configurations");
 
-        // Debug: Write scanning info to temp file for diagnostics
-        var debugPath = Path.Combine(Path.GetTempPath(), "aspire-deprecated-scan.log");
-        File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}] Scanning context.RepositoryRoot: {context.RepositoryRoot.FullName}\n");
-
         foreach (var location in s_configLocations)
         {
             var configPath = Path.Combine(context.RepositoryRoot.FullName, location.RelativePath);
-            File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}] Checking {location.AgentName}: {configPath}\n");
 
             if (!File.Exists(configPath))
             {
-                File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> File does not exist\n");
                 continue;
             }
 
-            File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> File EXISTS!\n");
-
             try
             {
                 var content = File.ReadAllText(configPath);
-                File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> Content: {content.Substring(0, Math.Min(200, content.Length))}\n");
                 var config = JsonNode.Parse(content)?.AsObject();
 
                 if (config is null)
                 {
-                    File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> JSON parse returned null\n");
                     continue;
                 }
 
                 var hasDeprecated = HasDeprecatedMcpCommand(config, location);
-                File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> HasDeprecatedMcpCommand: {hasDeprecated}\n");
 
                 if (hasDeprecated)
                 {
@@ -80,17 +69,14 @@ public Task ScanAsync(AgentEnvironmentScanContext context, CancellationToken can
                     // Create an applicator to update this config
                     var applicator = CreateUpdateApplicator(location, configPath, config);
                     context.AddApplicator(applicator);
-                    File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> Added applicator\n");
                 }
             }
             catch (JsonException ex)
             {
-                File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> JsonException: {ex.Message}\n");
                 _logger.LogDebug(ex, "Failed to parse {AgentName} config at {Path}", location.AgentName, configPath);
             }
             catch (IOException ex)
             {
-                File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}]   -> IOException: {ex.Message}\n");
                 _logger.LogDebug(ex, "Failed to read {AgentName} config at {Path}", location.AgentName, configPath);
             }
         }

Fix Completeness Assessment

The patch in commit c408ec5bf44e43203c278990a43aea93145248f3 completely eliminates the vulnerable code path in DeprecatedMcpCommandScanner. Furthermore, in companion commit 1ecd7cc70b5a5a5b8571fe3af69faa1646b8de47 (PR 67626), Microsoft relocated CLI SDK temporary working directories from the OS-shared /tmp directory to <ASPIRE_HOME>/tmp/sdk/<unique-id> with explicit 0700 owner-only permissions on Unix platforms. This systemic hardening prevents variant temporary file disclosure bugs across other CLI operations.

Exploitation

Exploiting CVE-2026-120792 requires local access to a multi-user host (such as a shared Linux development server, CI/CD build agent, or terminal server) where another user executes the .NET Aspire CLI.

Prerequisites

  • Local Access (AV:L, PR:L): The attacker must possess a low-privileged local shell or execution context on the target machine.
  • User Interaction (UI:R): A victim user on the same machine must run an Aspire CLI workflow that invokes DeprecatedMcpCommandScanner (such as aspire agent init) inside a repository containing MCP configuration files.

Attack Methodology

  1. Passive Monitoring: The local attacker monitors the system temporary directory for the creation or modification of /tmp/aspire-deprecated-scan.log. Because the filename is static and predictable, no directory traversal or brute-forcing of random suffixes is necessary:
# Continuously watch or tail the predictable log file path
tail -F /tmp/aspire-deprecated-scan.log 2>/dev/null
  1. Trigger Event: When the victim executes aspire agent init within their private home directory (e.g., /home/victim/project with 0700 permissions), the CLI scans .cursor/mcp.json or .vscode/mcp.json.

  2. Data Exfiltration: The CLI writes the repository path and configuration header to /tmp/aspire-deprecated-scan.log with world-readable (0644) permissions. The attacker's tail process immediately captures output matching the following structure:

[2026-11-03T12:00:00.0000000Z] Scanning context.RepositoryRoot: /home/victim/confidential-project
[2026-11-03T12:00:00.0010000Z] Checking Cursor: /home/victim/confidential-project/.cursor/mcp.json
[2026-11-03T12:00:00.0020000Z]   -> File EXISTS!
[2026-11-03T12:00:00.0030000Z]   -> Content: {
  "mcpServers": {
    "production-db": {
      "command": "npx",
      "env": {
        "API_KEY": "sk-live-9876543210abcdef1234567890"
      }
    }
  }
}
  1. Pre-Creation / Integrity Interference: Alternatively, if an attacker creates /tmp/aspire-deprecated-scan.log prior to the victim running the CLI and sets restrictive permissions (chmod 0000 /tmp/aspire-deprecated-scan.log), File.AppendAllText will throw an unhandled UnauthorizedAccessException (as the try/catch block in ScanAsync only catches JsonException and IOException, and File.AppendAllText outside the try block is completely unguarded), causing a denial of service in the victim's CLI session.

Impact Assessment

CVE-2026-120792 carries a CVSS v3.1 base score of 7.3 (High) with the vector CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L.

Confidentiality Impact (C:H) & Scope Change (S:C)

The primary impact of this vulnerability is the unauthorized disclosure of high-value credentials stored inside MCP agent configurations. While the vulnerability is triggered locally within the context of the Aspire CLI process, the exposed credentials (such as cloud provider keys, LLM API tokens, internal database connection strings, and bearer tokens) authenticate against external infrastructure and remote services. Consequently, the CVSS Scope is Changed (S:C), as compromising the local log file grants the attacker access to external security domains beyond the local CLI environment.

Integrity (I:L) & Availability (A:L) Impact

Because the log file is opened outside of the try block at the start of ScanAsync without verifying file ownership or using exclusive creation flags:

var debugPath = Path.Combine(Path.GetTempPath(), "aspire-deprecated-scan.log");
File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}] Scanning context.RepositoryRoot: {context.RepositoryRoot.FullName}\n");

A local attacker can pre-create /tmp/aspire-deprecated-scan.log with read-only permissions to force File.AppendAllText to fail with an unhandled UnauthorizedAccessException, aborting the victim's aspire command execution (A:L). Furthermore, on operating systems or container environments where symlink protection (fs.protected_symlinks) is disabled, an attacker can symlink /tmp/aspire-deprecated-scan.log to a file owned by the victim, causing the victim's process to append log lines to an arbitrary target file (I:L).

Remediation

Microsoft addressed CVE-2026-120792 in .NET Aspire version 13.6.5. Updating the CLI removes the temporary file logging functionality entirely, routing all diagnostic messages through the internal ILogger infrastructure.

Remediation Steps

  1. Update .NET Aspire CLI: Upgrade all developer workstations, shared build servers, and CI/CD environments to .NET Aspire 13.6.5 or later:
dotnet workload update
# Or update the standalone Aspire.Cli package / binary to >= 13.6.5
  1. Purge Residual Log Files: Updating the CLI does not automatically delete previously generated log files from the operating system's temporary directory. Administrators and developers must manually remove existing instances of aspire-deprecated-scan.log:
# Linux / macOS
rm -f /tmp/aspire-deprecated-scan.log /var/tmp/aspire-deprecated-scan.log
 
# Windows (PowerShell)
Remove-Item -Path "$env:TEMP\aspire-deprecated-scan.log" -Force -ErrorAction SilentlyContinue
  1. Rotate Exposed Credentials: If aspire agent init or MCP scanning workflows were executed on shared or multi-user hosts using versions 13.5.4 through < 13.6.5, inspect any MCP configuration files (.cursor/mcp.json, .vscode/mcp.json, etc.) present in those workspaces and rotate all API keys, tokens, or secrets contained within them.

> [!NOTE] > Workaround for Unpatched Environments: If immediate upgrading is not feasible on a multi-user Unix system, users should configure a per-user isolated temporary directory (e.g., setting TMPDIR="$HOME/.tmp" with 0700 permissions) and set a restrictive umask 0077 prior to invoking aspire commands.

Official Patches

MicrosoftMicrosoft Security Response Center (MSRC) Official Advisory for CVE-2026-120792
Microsoft.NET Aspire Release v13.6.5
MicrosoftPrimary Fix Commit Removing Temporary File Logging

Fix Analysis (1)

Technical Appendix

CVSS Score
7.3/ 10
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L

Affected Systems

Microsoft .NET Aspire CLI (Aspire.Cli)Microsoft .NET Aspire SDK (versions 13.5.4 to < 13.6.5)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Aspire.Cli / .NET Aspire
Microsoft
>= 13.5.4, < 13.6.513.6.5
AttributeDetail
CVE IDCVE-2026-120792
Vulnerability ClassCWE-532 (Insertion of Sensitive Information into Log File) / CWE-377 (Insecure Temporary File)
CVSS v3.1 Score7.3 HIGH (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:L)
Attack VectorLocal (Shared Temporary Directory /tmp/aspire-deprecated-scan.log)
Affected ComponentDeprecatedMcpCommandScanner in Microsoft .NET Aspire CLI (13.5.4 to < 13.6.5)
Patched Version.NET Aspire 13.6.5
ImpactHigh Confidentiality Impact (Disclosure of MCP API keys, tokens, and workspace paths)
Exploit / KEV StatusNo Public PoC / Not Listed in CISA KEV

MITRE ATT&CK Mapping

T1552.001Unsecured Credentials: Credentials In Files
Credential Access
CWE-532
Insertion of Sensitive Information into Log File

The product writes sensitive information to a log file, allowing unauthorized actors with access to the log file to extract credentials, keys, or internal path structures.

Vulnerability Timeline

Servicing dependency preparation for Aspire 13.6.5 initiated (commit 6cfe6b409805bb21775623d501aa1475cb9ee25c)
2026-10-28
Vulnerability patched in microsoft/aspire commit c408ec5bf44e43203c278990a43aea93145248f3 (PR 68060)
2026-11-03
Official CVE-2026-120792 advisory published by Microsoft CNA and indexed in NVD
2026-11-10
NVD record updated with CVSS v3.1 metrics and CWE mappings
2026-11-11

References & Sources

  • [1]Microsoft Security Response Center (MSRC) Advisory: CVE-2026-120792
  • [2]CVE.org Record: CVE-2026-120792
  • [3]GitHub Fix Commit: Remove temporary-file logging from deprecated MCP scanner
  • [4]GitHub Pull Request #22071 (microsoft/aspire)
  • [5]GitHub Release Tag: Microsoft .NET Aspire v13.6.5
  • [6]MITRE ATT&CK Search Reference for CVE-2026-120792
  • [7]CISA Known Exploited Vulnerabilities Catalog

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•12 minutes ago•CVE-2026-114154
7.5

CVE-2026-114154: Denial of Service in ASP.NET Core HttpSys Request Header Processing

CVE-2026-114154 is a high-severity Denial of Service (DoS) and uncontrolled resource consumption vulnerability in the Microsoft.AspNetCore.Server.HttpSys component of ASP.NET Core. When processing an HTTP request that simultaneously contains a chunked Transfer-Encoding header, a Content-Length header, and an explicit X-Content-Length header, the server throws an unhandled ArgumentException during header normalization. In certain versions, subsequent exception handling attempts to dereference a disposed native request context, aborting error response dispatch and leaking unmanaged HTTP.sys request structures.

Amit Schendel
Amit Schendel
0 views•9 min read
•about 1 hour ago•CVE-2026-120778
7.3

CVE-2026-120778: Local Elevation of Privilege via Insecure Temporary Directory Handling and MSBuild Response File Hijacking in Microsoft .NET Aspire CLI

A local elevation of privilege vulnerability exists in the Microsoft .NET Aspire CLI (`Aspire.Cli`) versions 13.5.4 prior to 13.6.5. When executing SDK management commands (`aspire sdk generate`, `aspire sdk dump`, and `aspire sdk export`), the CLI creates temporary project directories inside the shared operating system temporary folder (such as `/tmp` on Unix-like systems) without restricting directory permissions or disabling MSBuild automatic response file resolution. A local, low-privileged attacker on a multi-user system can place a crafted `Directory.Build.rsp` file in the shared temporary directory hierarchy. When a victim user executes an affected Aspire CLI command, MSBuild traverses upward, ingests the attacker-controlled response file, and executes arbitrary commands in the security context of the victim user.

Alon Barad
Alon Barad
2 views•10 min read
•about 3 hours ago•CVE-2026-114159
8.8

CVE-2026-114159: Heap-Based Buffer Overflow in Microsoft Visual Studio and .NET Native Symbol Reader

CVE-2026-114159 is a heap-based buffer overflow vulnerability (CWE-122) in Microsoft.DiaSymReader.Native affecting Microsoft Visual Studio and the .NET Runtime on Windows. An integer truncation error during the parsing of oversized document names in Portable PDB symbol files causes an undersized heap allocation, leading to an out-of-bounds memory write and remote code execution.

Alon Barad
Alon Barad
6 views•10 min read
•about 4 hours ago•CVE-2026-114158
8.8

CVE-2026-114158: Heap-Based Buffer Overflow in Microsoft.DiaSymReader.Native Portable PDB Parser

CVE-2026-114158 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported servicing branches of Microsoft .NET (.NET 8.0, 9.0, 10.0, and 11.0) on Windows. The flaw resides in the native symbol reader library, Microsoft.DiaSymReader.Native, and is triggered when parsing Portable Program Database (PDB) metadata containing malformed EmbeddedSource custom debug information records. By supplying a parent Record Identifier (RID) of zero or an out-of-bounds value, an attacker causes an integer underflow during 1-based to 0-based index conversion, leading to a heap-based buffer overflow and arbitrary code execution within the context of the host developer tool or runtime.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 5 hours ago•CVE-2026-114151
8.8

CVE-2026-114151: Remote Code Execution via Stack-Based Buffer Overflow in Microsoft Visual Studio and .NET Symbol Reader

CVE-2026-114151 is a high-severity remote code execution vulnerability affecting Microsoft Visual Studio 2026 and multiple supported versions of the Microsoft .NET runtime on Windows. The flaw resides in the native Debug Information Access (DIA) symbol reader component, Microsoft.DiaSymReader.Native. When parsing Program Database (.pdb) files, the component fails to validate the length of serialized numeric records (specifically LF_DECIMAL structures) before unpacking them into a fixed-size stack buffer. An attacker who convinces a user or automated diagnostic process to load a crafted .pdb file can trigger a stack-based buffer overflow, resulting in arbitrary code execution within the context of the host process.

Alon Barad
Alon Barad
5 views•9 min read
•about 6 hours ago•GHSA-6856-87HX-P5X7
7.5

CVE-2026-105544: Local Elevation of Privilege in .NET Test Platform CLI

CVE-2026-105544 is a high-severity local elevation of privilege vulnerability in Microsoft .NET and Microsoft.TestPlatform.CLI. Improper access control on local inter-process communication mechanisms and execution brokers allows an authorized local attacker to cross security boundaries and execute arbitrary code in the context of a higher-privileged user running a test execution cycle.

Amit Schendel
Amit Schendel
6 views•9 min read