This vulnerability occurs when an ASP.NET application stores passwords or other sensitive credentials in plaintext within configuration files like web.config. This exposes those credentials to anyone with file system access, effectively bypassing security controls and granting unauthorized access to protected resources.
Configuration files such as web.config are often deployed alongside application code and may be readable by various system accounts or, in worst-case scenarios, accessible via web server misconfigurations. Storing secrets like database passwords, API keys, or service account credentials in these files creates a single point of failure. Attackers who can read the file—whether through directory traversal, compromised backups, or insider access—immediately gain the privileges associated with those credentials. To prevent this, never store sensitive values in plaintext within configuration files. Instead, use secure alternatives like the ASP.NET built-in mechanisms for protecting configuration sections (e.g., `aspnet_regiis`), the Protected Configuration feature with RSA or DPAPI, or dedicated secret management services such as Azure Key Vault or HashiCorp Vault. For connection strings, consider using Integrated Windows Authentication where possible to eliminate password storage entirely.
Impact: Gain Privileges or Assume Identity
asp.net