SonicWall Secure Mobile Access unzip Directory Traversal Remote Code Execution Vulnerability
The unzip method in SonicWall Secure Mobile Access did not properly validate a user-supplied path before using it in file operations. An authenticated attacker could exploit this to execute code as root.
Brian Mariani - DigitalCanion SA Follow
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of SonicWall Secure Mobile Access. Authentication is required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the unzip routine joined user-supplied path names to a destination directory without checking for traversal sequences, allowing files to be written outside the intended location.
Impact
An authenticated remote attacker could execute arbitrary code with root privileges on affected installations.
What the attacker needed
Authentication required; affected SonicWall SMA installation
The fix
SonicWall issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program unpacks a zip file, it should only write files inside the intended folder. Here it trusted a path supplied by the user, so a crafted archive could place files elsewhere on the system. Because those files could be run with the highest privileges, an attacker with a login could take over the device.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.