This module exploits built-in functionality in OpenNMS Horizon in order to execute arbitrary commands as the opennms user. For versions 32.0.2 and higher, this module requires valid credentials for a user with ROLE_FILESYSTEM_EDITOR privileges and either ROLE_ADMIN or ROLE_REST. For versions 32.0.1 and lower, credentials are required for a user with ROLE_FILESYSTEM_EDITOR, ROLE_REST, and/or ROLE_ADMIN privileges. In that case, the module will automatically escalate privileges via CVE-2023-40315 or CVE-2023-0872 if necessary. This module has been successfully tested against OpenNMS version 31.0.7
Exploit database
Vulnerability
CVE-2023-0872
ROLE_REST can be used to escalate to ROLE_ADMIN via /rest/users
Vulnerability details
- Score
- 8.2
- Severity
- high
CVSS 3.1 · OpenNMS
Vector string
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:LDescription
The Horizon REST API includes a users endpoint in OpenMNS Horizon 31.0.8 and versions earlier than 32.0.2 on multiple platforms is vulnerable to elevation of privilege. The solution is to upgrade to Meridian 2023.1.6, 2022.1.19, 2021.1.30, 2020.1.38 or Horizon 32.0.2 or newer. Meridian and Horizon installation instructions state that they are intended for installation within an organization's private networks and should not be directly accessible from the Internet. OpenNMS thanks Erik Wynter for reporting this issue.
CVE ProgramExploit source choices
1 sourceOpenNMS Horizon Authenticated RCE
2023-07-01opennms_horizon_authenticated_rce.rb