Configuration Management / Insecure Whitelist
##Description Insecure whitelist is a common configuration management vulnerability, listed as CWE-759, which occurs when an application or system incorrectly implements a whitelisting process. This vulnerability is common in Android, iOS and Mobile App environments and can be used to bypass authentication and authorization controls. According to the OWASP Testing Guide, this occurs when an application fails to properly validate the whitelist input, or fails to properly enforce the whitelist controls. This can allow an attacker to bypass authentication and authorization controls, as well as inject malicious code or data into the application.
##Risk Insecure whitelist can be a critical security risk, as it can allow an attacker to access sensitive data, inject malicious code, and bypass access control measures. This can lead to data breaches and other security incidents, such as unauthorized access to confidential information, disruption of systems, and malicious code execution. Risk assessment should consider the potential impact of these attacks and the difficulty of attacking the system.
##Solution The primary solution for this vulnerability is to ensure that whitelisting is properly implemented. This includes validating the whitelist input, ensuring the whitelist is up-to-date, and enforcing whitelist controls. Additionally, proper access control measures should be in place to limit the damage of successful attacks.
##Example The following example code is a vulnerable implementation of a whitelist on an Android device. In this example, the application is not validating the whitelist input, and is not enforcing the whitelist controls.
if (whitelist.contains(appName)) { appAllowed = true; }