CVE-2025-59695
Executive Summary
CVE-2025-59695 is a critical security vulnerability affecting Entrust nShield hardware security modules (HSMs), specifically the nShield Connect XC, nShield 5c, and nShield HSMi series. The flaw, designated as "F04" by the vendor, allows a user with OS-level root access to alter firmware on the Chassis Management Board (CMB) without any authentication. This effectively bypasses the hardware root of trust, enabling a persistent, low-level compromise that can survive OS reinstallation and potentially exfiltrate cryptographic keys or alter HSM behavior. The vulnerability is currently unpatched, and no public exploit code or proof-of-concept is available. The attack requires high privileges (root on the host OS), but the impact is severe, as it undermines the fundamental security guarantees of the HSM.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to a software package manager (NPM, PyPI, Go, Ruby). It is a hardware/firmware-level issue in a physical security appliance. The supply chain risk is that an attacker with temporary physical or remote root access to the HSM host can implant persistent, undetectable backdoors in the CMB firmware, which could then be used to compromise all future cryptographic operations.
CVSS Breakdown & Threat Level
Estimated CVSS Score: 7.5 (High)
- Attack Vector (AV): Local (L) – Requires root access to the host OS.
- Attack Complexity (AC): Low (L) – The attack is straightforward once root access is obtained.
- Privileges Required (PR): High (H) – Requires root privileges.
- User Interaction (UI): None (N) – No user interaction required.
- Scope (S): Unchanged (U) – The vulnerable component (CMB) is within the same security boundary.
- Confidentiality (C): High (H) – Potential to leak all keys and secrets managed by the HSM.
- Integrity (I): High (H) – Firmware can be modified, altering HSM behavior.
- Availability (A): High (H) – Firmware modification could render the HSM inoperable.
Threat Level: High. While the attack requires root access, the impact is a complete compromise of the HSM's hardware root of trust. This is a prime target for advanced persistent threats (APTs) seeking to steal cryptographic keys or sabotage critical infrastructure.
Deep Dive & Mechanics
The vulnerability lies in the firmware update mechanism for the Chassis Management Board (CMB) within the affected nShield HSM models. The CMB is a secondary microcontroller responsible for chassis management functions (e.g., power, temperature, fan control). Critically, it also holds or interacts with the hardware root of trust.
The Flaw (F04): The CMB firmware update process does not require any authentication. A user with root access on the host operating system can directly write new firmware to the CMB's flash memory. This is likely achieved through a proprietary interface (e.g., I2C, SPI, or a dedicated PCIe endpoint) that is exposed to the host OS.
Attack Flow:
- Gain Root Access: The attacker must first obtain root-level access to the host OS running the nShield software. This could be achieved through a separate vulnerability, social engineering, or insider threat.
- Identify CMB Interface: The attacker identifies the memory-mapped or device-file interface used to communicate with the CMB.
- Craft Malicious Firmware: The attacker creates a custom firmware image for the CMB. This firmware could:
- Exfiltrate cryptographic keys during generation or use.
- Weaken random number generation.
- Disable security checks.
- Provide a backdoor for remote access.
- Brick the device.
- Flash Firmware: The attacker writes the malicious firmware to the CMB using the unauthenticated interface.
- Persist: The malicious firmware persists across power cycles and OS reinstalls, as it resides in the CMB's non-volatile memory.
Vulnerable vs. Patched Code
No code diff is available as this is a hardware/firmware vulnerability. The "vulnerable code" is the absence of any authentication check in the CMB firmware update routine. A "patched" version would require the host to present a cryptographic signature (e.g., RSA or ECDSA) before the CMB accepts a firmware update.
Conceptual Vulnerable Code (Pseudo-C):
// Vulnerable: No authentication check
void cmb_firmware_update(uint8_t *firmware_data, uint32_t length) {
// Directly write to flash
flash_erase(CMB_FLASH_START);
flash_write(CMB_FLASH_START, firmware_data, length);
// Reboot CMB
cmb_reset();
}
Conceptual Patched Code (Pseudo-C):
// Patched: Requires signature verification
void cmb_firmware_update(uint8_t *firmware_data, uint32_t length, uint8_t *signature) {
if (!verify_signature(firmware_data, length, signature, PUBLIC_KEY)) {
return; // Reject update
}
flash_erase(CMB_FLASH_START);
flash_write(CMB_FLASH_START, firmware_data, length);
cmb_reset();
}
Exploitation & Lab Setup
No public exploit code is available. The following is a theoretical lab setup and exploitation approach.
Red Team (Offensive)
Lab Setup:
- Hardware: Entrust nShield Connect XC (or other affected model).
- Software: Standard nShield software stack (version <= 13.6.11 or 13.7).
- Access: Root shell on the host OS.
Exploitation Steps:
- Reconnaissance: Identify the CMB interface.
# Look for nShield specific devices or memory regions ls -la /dev/nshield* cat /proc/iomem | grep -i cmb - Dump Original Firmware (Optional):
# Use a tool like dd or a custom utility to read the CMB flash dd if=/dev/nshield_cmb of=original_firmware.bin bs=1M count=1 - Craft Malicious Firmware: Modify the dumped firmware or create a new one. For example, add a backdoor that sends a copy of all generated keys to a remote server.
- Flash Malicious Firmware:
# Write the malicious firmware to the CMB dd if=malicious_firmware.bin of=/dev/nshield_cmb bs=1M count=1 - Trigger CMB Reboot:
# Send a reset command to the CMB echo 1 > /sys/devices/platform/nshield_cmb/reset
Blue Team (Defensive)
Detection:
- Monitor CMB Flash Activity: Use kernel-level auditing to monitor writes to the CMB device file or memory region.
- Firmware Integrity Checks: Periodically compute a cryptographic hash of the CMB firmware and compare it to a known-good baseline.
- Host Integrity Monitoring: Monitor for unauthorized root access attempts and unusual process execution.
Prevention:
- Principle of Least Privilege: Strictly limit root access to the HSM host.
- Hardening: Harden the host OS against privilege escalation.
- Network Segmentation: Place the HSM on a dedicated, isolated management network.
- Physical Security: Restrict physical access to the HSM.
Indicators of Compromise (IOCs)
- File System:
- Unexpected firmware files in
/tmp/or/root/(e.g.,*.bin,*.img). - Modified or new kernel modules related to nShield.
- Unexpected firmware files in
- Processes:
- Unusual processes with root privileges interacting with
/dev/nshield*or/sys/devices/platform/nshield*.
- Unusual processes with root privileges interacting with
- Network:
- Outbound connections from the HSM host to unexpected IP addresses (potential key exfiltration).
- Hardware:
- CMB firmware hash mismatch compared to a known-good baseline.
- Unexpected CMB behavior (e.g., temperature readings, fan speeds).
Detection Engineering
YARA Rule
rule CVE_2025_59695_CMB_Firmware_Modification {
meta:
description = "Detects potential CMB firmware modification attempts for CVE-2025-59695"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-59695"
strings:
$cmb_device = /\/dev\/nshield_cmb/i
$cmb_sysfs = /\/sys\/devices\/platform\/nshield_cmb/i
$firmware_write = /dd if=.*\.bin of=\/dev\/nshield_cmb/i
$firmware_echo = /echo 1 > .*reset/i
condition:
any of ($cmb_device, $cmb_sysfs) and any of ($firmware_write, $firmware_echo)
}
Sigma Rule
title: Potential CMB Firmware Modification (CVE-2025-59695)
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to write to the nShield CMB device or reset it, indicating a potential exploitation of CVE-2025-59695.
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-59695
logsource:
category: process_creation
product: linux
detection:
selection_cmb_write:
Image|endswith: '/dd'
CommandLine|contains: '/dev/nshield_cmb'
selection_cmb_reset:
Image|endswith: '/bash'
CommandLine|contains: 'reset'
CommandLine|contains: 'nshield_cmb'
condition: selection_cmb_write or selection_cmb_reset
falsepositives:
- Legitimate firmware updates by authorized administrators (should be rare and logged).
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-59695 - Potential Key Exfiltration from nShield HSM"; flow:to_server,established; content:"|00 01 02 03|"; depth:4; offset:0; classtype:attempted-recon; sid:1000001; rev:1;)
Note: The above Suricata rule is a placeholder. A real rule would need to detect the specific protocol or data pattern used for key exfiltration, which is unknown at this time.
Remediation & Mitigation
Immediate Actions:
- Isolate HSMs: Ensure affected nShield HSMs are on a dedicated, highly restricted management network.
- Audit Access: Review and revoke unnecessary root access to HSM hosts.
- Monitor Logs: Enable detailed auditing and monitor for the IOCs listed above.
- Contact Entrust: Reach out to Entrust support for an official patch or mitigation guidance.
Long-Term Fix:
- Apply Vendor Patch: Once Entrust releases a firmware update that implements authentication for CMB updates, apply it immediately.
- Hardware Replacement: If no patch is forthcoming, consider replacing the affected HSM models with newer, patched hardware.
Workarounds:
- Disable CMB Update Interface: If possible, physically or logically disable the interface used to update the CMB firmware (e.g., remove a jumper, disable a kernel module). This is a last resort and may impact functionality.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.