TerraMaster TOS v4.1.24 RCE

By
Prathap
Published on
16 Jun 2021
Vulnerability

In TerraMaster TOS, a dynamic class method invocation vulnerability may take place in include/exportUser.php.This may lead to code injection with root privileges. Due to the invalid parameter checking, an attacker can use the opt parameter to initiate a call to the exec method. To approach the method call and exploit this vulnerability, the vulnerable file needs multiple HTTP GET parameters to be supplied. Initially, the application includes a code file that autoloads relevant TOS software core classes.Based on the value of the GET parameter type, the application determines which operation is to be performed. It is likely to access vulnerable code if the value of the type variable isn’t 1 or 2.It is possible to initiate remote code execution as the exportUser.php does not have any authentication controls

Mitigation / Precaution

In order to patch this vulnerability, please install the official patch TerraMaster made available for supported, vulnerable instances.

Automated human-like penetration testing for your web apps & APIs
Teams using Beagle Security are set up in minutes, embrace release-based CI/CD security testing and save up to 65% with timely remediation of vulnerabilities. Sign up for a free account to see what it can do for you.

Written by
Prathap
Prathap
Co-founder, Director
Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 10 days
Find surface-level website security issues in under a minute
Free website security assessment
Experience the power of automated penetration testing & contextual reporting.