CWE-520: .NET Misconfiguration: Use of Impersonation

VariantIncomplete

Allowing a .NET application to run at potentially escalated levels of access to the underlying operating and file systems can be dangerous and result in various forms of attacks.

View on MITRE
Back to CWE Lookup

Extended Description

.NET server applications can optionally execute using the identity of the user authenticated to the client. The intention of this functionality is to bypass authentication and access control checks within the .NET application code. Authentication is done by the underlying web server (Microsoft Internet Information Service IIS), which passes the authenticated token, or unauthenticated anonymous token, to the .NET application. Using the token to impersonate the client, the application then relies on the settings within the NTFS directories and files to control access. Impersonation enables the application, on the server running the .NET application, to both execute code and access resources in the context of the authenticated and authorized user.

Technical Details

Structure
Simple
Vulnerability Mapping
ALLOWED

Applicable To

Languages
ASP.NETVB.NETNot Language-Specific
Platforms

Source-backed guidance

Additional facts reviewed against primary or authoritative security sources.

Verify controls for CWE-520 with SSDF evidence

Use NIST SSDF verification and vulnerability-response practices to detect CWE-520, .NET Misconfiguration: Use of Impersonation, throughout the product lifecycle. Derive review questions, static or dynamic checks, and negative tests from the CWE's causal behavior; define the components and lifecycle stages each check covers; and retain findings with enough evidence to distinguish the root cause from symptoms and impacts. Track escapes and false negatives, then improve the verification plan after every confirmed occurrence.

NIST SP 800-218 Secure Software Development FrameworkNational Institute of Standards and Technology

Address .NET Misconfiguration: Use of Impersonation during Operation

MITRE associates mitigation with Operation; recorded impacts include Gain Privileges or Assume Identity; related weaknesses include CWE-266. Use these source-defined anchors to turn CWE-520 into implementation, review, and verification checks for the affected component.

CWE-520: .NET Misconfiguration: Use of ImpersonationMITRE CWE

Triage CWE-520 against known exploitation evidence

Use CISA's Known Exploited Vulnerabilities catalog to test whether a vulnerability mapped to CWE-520, .NET Misconfiguration: Use of Impersonation, has evidence of exploitation in the wild. Confirm the CVE-to-CWE root-cause mapping independently before attaching the example, then capture the affected product, required action, and remediation deadline. A missing KEV match is not evidence that the weakness is unexploited, and a KEV entry must not be generalized to every occurrence of this CWE.

Known Exploited Vulnerabilities CatalogCybersecurity and Infrastructure Security Agency

Apply precise root-cause mapping to CWE-520

Apply MITRE's full root-cause mapping guidance when using CWE-520, .NET Misconfiguration: Use of Impersonation. Separate weakness language from attacker prerequisites and technical impact, check the entry's abstraction and vulnerability-mapping notes, and prefer the most specific Base or Variant supported by the evidence. Record the rejected alternatives and require an independent review before the mapping is used for remediation trends or program metrics.

CVE to CWE Root Cause Mapping GuidanceMITRE CWE

Validate CWE-520 with root-cause mapping checks

Apply MITRE's root-cause mapping quick tips to CWE-520, .NET Misconfiguration: Use of Impersonation. Confirm the finding describes the causal weakness rather than an impact or attack pattern, compare the abstraction and mapping notes with plausible alternatives, and have a second reviewer challenge the selection. Preserve the evidence and reasoning so recurring defects can be measured against one consistent identifier.

CVE to CWE Root Cause Mapping Quick TipsMITRE CWE

Frequently Asked Questions

What is CWE-520: .NET Misconfiguration: Use of Impersonation?+

CWE-520: .NET Misconfiguration: Use of Impersonation is a Common Weakness Enumeration (CWE) entry maintained by MITRE. Allowing a .NET application to run at potentially escalated levels of access to the underlying operating and file systems can be dangerous and result in various forms of attacks. .NET server applications can optionally execute using the identity of the user authenticated to the client. The intention of this functionality is to bypass authentication and access control checks within the .NET application code. Authentication is done by the underlying web server (Microsoft Internet Information Service IIS), which passes the authenticated token, or unauthenticated anonymous token, to the .NET application. Using the token to impersonate the client, the application then relies on the settings within the NTFS directories and files to control access. Impersonation enables the application, on the server running the .NET application, to both execute code and access resources in the context of the authenticated and authorized user.

What are the security consequences of .NET Misconfiguration: Use of Impersonation?+

If exploited, CWE-520 (.NET Misconfiguration: Use of Impersonation) it can compromise Access Control, leading to outcomes such as Gain Privileges or Assume Identity.

How do you prevent or mitigate .NET Misconfiguration: Use of Impersonation?+

Recommended mitigations for CWE-520 include: Run the application with limited privilege to the underlying operating and file system.

Which programming languages are affected by .NET Misconfiguration: Use of Impersonation?+

CWE-520 commonly affects ASP.NET, VB.NET and Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-520 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More

Advertisement