Looking for the vulnerability index of Invicti's legacy products?
ASP.NET Deny missing from authorization rule on location - Vulnerability Database

ASP.NET Deny missing from authorization rule on location

Description

The web.config file contains an authorization section with allow rules but lacks an explicit deny rule to restrict unauthorized users. ASP.NET processes authorization rules sequentially and includes an implicit "allow all" rule at the end of the evaluation chain. Without an explicit deny rule, any users not matched by the allow rules will be granted access by default, effectively bypassing the intended access restrictions.

Remediation

Add an explicit deny rule at the end of each authorization section to block all users not explicitly allowed. The deny rule should use users="*" to match all authenticated and anonymous users, or users="?" to match only anonymous users if authenticated access should be permitted.

Example of a properly configured authorization section:

<authorization>
  <allow users="admin"/>
  <deny users="*"/>
</authorization>
Review all <location> elements and the root <authorization> section in web.config to ensure each contains an appropriate deny rule. Test the configuration by attempting to access protected resources with unauthorized user accounts to verify that access is properly denied.

Related Vulnerabilities