BEWARD N100 H.264 VGA IP Camera M2.1.6 Arbitrary File Disclosure

Title: BEWARD N100 H.264 VGA IP Camera M2.1.6 Arbitrary File Disclosure
Advisory ID: ZSL-2019-5511
Type: Remote/Local
Impact: Exposure of System Information, Exposure of Sensitive Information
Risk: (3/5)
Release Date: 04.02.2019
Summary
The N100 compact color IP camera with support for a more efficient compression format is optimized for low-speed networks, thanks to which it transmits a real-time image over the network with minimal delays. The camera supports the switching of the broadcast modes, and in the event of a break in communication with the remote file storage, it can continue recording to the microSDHC memory card. N100 is easy to install and configure, has all the necessary arsenal for the organization of low-cost professional video surveillance systems.
Description
The camera suffers from an authenticated file disclosure vulnerability. Input passed via the 'READ.filePath' parameter in fileread script is not properly verified before being used to read files. This can be exploited to disclose the contents of arbitrary files via absolute path or via the SendCGICMD API.
Vendor
Beward R&D Co., Ltd - https://www.beward.net
Affected Version
M2.1.6.04C014
Tested On
Boa/0.94.14rc21
Farady ARM Linux 2.6
Vendor Status
[26.01.2019] Vulnerability discovered.
[28.11.2018] Vendor contacted.
[03.02.2019] No response from the vendor.
[04.02.2019] Public security advisory released.
PoC
beward_fd.txt
Credits
Vulnerability discovered by Gjoko Krstic - <gjoko@zeroscience.mk>
References
[1] https://www.exploit-db.com/exploits/46320
[2] https://packetstormsecurity.com/files/151530
[3] https://exchange.xforce.ibmcloud.com/vulnerabilities/156600
Changelog
[04.02.2019] - Initial release
[10.02.2019] - Added reference [1], [2] and [3]
Contact
Zero Science Lab

Web: http://www.zeroscience.mk
e-mail: lab@zeroscience.mk