(Pwn2Own) Western Digital MyCloud PR4100 restsdk Directory Traversal Arbitrary File Read and Write Vulnerability
The restsdk binary on Western Digital MyCloud PR4100 NAS devices fails to properly validate user-supplied paths before using them in file operations. A remote attacker who bypasses the existing authentication could create and read arbitrary files, and chain this with other flaws to run code as root.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to create and read arbitrary files on affected installations of Western Digital MyCloud PR4100 NAS devices. Although authentication is required to exploit this vulnerability, the existing authentication mechanism can be bypassed.
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
Impact
An attacker could create and read arbitrary files on the device and, chained with other vulnerabilities, execute code as root; authentication is required but the existing mechanism can be bypassed.
What the attacker needed
Network access to the NAS; bypass of the authentication mechanism
The fix
Western Digital issued a firmware update that corrects 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.
A NAS is a small storage server on a home or office network. This one runs a program that takes a file path from the user and opens it without checking where the path really points, so a crafted path can reach files outside the intended folder. That lets someone read or create files they should not touch, and combined with other bugs it can lead to full control of 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.