P5 FNIP-8x16A/FNIP-4xSH CSRF Stored Cross-Site Scripting

Title: P5 FNIP-8x16A/FNIP-4xSH CSRF Stored Cross-Site Scripting
Advisory ID: ZSL-2020-5564
Type: Local/Remote
Impact: Cross-Site Scripting
Risk: (3/5)
Release Date: 21.04.2020
Summary
The FNIP-8x16A is an eight channel relay module used for switching any type of load that doesn’t exceed the specifications. Via its built-in web site and TCP/IP communication, the outputs and inputs can be controlled and monitored from standard network capable devices such as computers, smartphones, web-tablets, etc. either locally or via the network. The module can be used independently or as part of a complex control system in residential and commercial installations.
Description
The controller suffers from CSRF and XSS vulnerabilities. The application allows users to perform certain actions via HTTP requests without performing any validity checks to verify the requests. This can be exploited to perform certain actions with administrative privileges if a logged-in user visits a malicious web site. Input passed to several GET/POST parameters is not properly sanitised before being returned to the user. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.
Vendor
P5 - https://www.p5.hu
Affected Version
1.0.20
1.0.11
Tested On
Linux
CGI
Vendor Status
[29.01.2020] Vulnerability discovered.
[14.04.2020] Vendor contacted.
[20.04.2020] No response from the vendor.
[21.04.2020] Public security advisory released.
PoC
p5_csrfxss.txt
Credits
Vulnerability discovered by Gjoko Krstic - <gjoko@zeroscience.mk>
References
[1] https://www.exploit-db.com/exploits/48362
[2] https://exchange.xforce.ibmcloud.com/vulnerabilities/180252
[3] https://exchange.xforce.ibmcloud.com/vulnerabilities/180253
[4] https://packetstormsecurity.com/files/157318
Changelog
[21.04.2020] - Initial release
[24.04.2020] - Added reference [1], [2], [3] and [4]
Contact
Zero Science Lab

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