Rapid7 today shared details on a series of vulnerabilities that SonicWall patched in the Secure Mobile Access (SMA) 100 series secure access gateway products last month.
The impacted devices include the SMA 200, 210, 400, 410, and 500 edge network access control systems that have the Web Application Firewall (WAF) enabled.
The most severe of these vulnerabilities is CVE-2021-20038 (CVSS score of 9.8), an unauthenticated stack-based buffer overflow that could lead to remote code execution (RCE) as the ‘nobody’ user.
“The vulnerability is due to the SonicWall SMA SSLVPN Apache httpd server GET method of mod_cgi module environment variables use a single stack-based buffer using `strcat`. This allows remote attacker to cause stack-based buffer overflow and would result in code execution,” SonicWall says.
According to Rapid7, whose researchers discovered the security error, SonicWall appears to have used a custom version of the cgi_build_command function, but with no bounds-checking implemented on the environment string buildup.
Thus, a malicious attacker could overflow the stack-based buffer and create an exploit that bypasses existing protections, including address space layout randomization (ASLR).
“It’s important to note that httpd is running as the ‘nobody’ user, so attackers don’t get to go straight to root access, but it’s one step away, as the exploit payload can su to root using the password ‘password’, Rapid7 explains.
An attacker able to successfully exploit the vulnerability can take over the affected device or the virtual machine running the vulnerable appliance. Thus, an attacker could install malware or intercept login credentials or perform other types of attacks.
Another security flaw identified by Rapid7 researchers is CVE-2021-20039 (CVSS score of 7.2), a command injection in cgi-bin that requires authentication as admin.
“An attacker would already need to know (or guess) a working username and password in order to elevate access from administrator to root-level privileges. In the ideal case, this is a non-trivial barrier to entry for attackers,” Rapid7 says.
Next in line is CVE-2021-20040 (CVSS score of 6.5), an unauthenticated file upload path traversal that allows an attacker to supply arbitrary code and “upload crafted web pages to the web server’s root directory or malicious files to any directory in the appliance as a nobody user,” as SonicWall explains.
Limitations that arise when exploiting this issue include the nobody privileges, which restrict the attacker to writing files to specific locations only, and the inability to overwrite existing files.
“Given these limitations, an attack scenario will likely involve tricking users into believing their custom-created content is a legitimate function of the SMA 100, for example, a password “reset” function that takes a password,” Rapid7 says.
The fourth vulnerability – CVE-2021-20041 (CVSS score of 7.5) – could allow an attacker to exhaust a CPU’s resources and potentially cause a denial of service condition, while the fifth – CVE-2021-20042 (CVSS score of 6.3) – could allow an unauthenticated attacker to use a vulnerable device as an unintended proxy.
SonicWall says it’s currently not aware of any malicious attacks exploiting these vulnerabilities.
Related: SonicWall Patches Y2K22 Bug in Email Security, Firewall Products
Related: SonicWall Customers Warned of High-Risk Flaws in Remote Access Appliances
Related: SonicWall Patches Critical Vulnerability in SMA Appliances