CVE-2025-59704
Executive Summary
CVE-2025-59704 exposes a critical security flaw in Entrust nShield hardware security modules (HSMs), specifically the nShield Connect XC, nShield 5c, and nShield HSMi models running firmware versions up to 13.6.11 and 13.7. The vulnerability allows a physical attacker to access the BIOS menu without any authentication. Since the BIOS menu is completely unprotected, an adversary with physical access can modify low-level firmware settings, potentially disabling security features, altering boot sequences, or loading malicious firmware. This undermines the entire trust model of the HSM, which is designed to protect cryptographic keys and operations.
Key Risk: Physical access to the device is required, but once obtained, the attacker gains full control over the system firmware, bypassing all software-level security controls. This is a severe supply chain and physical security risk for organizations relying on these HSMs for cryptographic operations.
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 software packages (NPM, PyPI, Go, Ruby) but is a hardware/firmware issue. However, it has significant supply chain implications: if an attacker can tamper with the HSM firmware during transit, storage, or maintenance, they can compromise the cryptographic root of trust for the entire organization. Organizations must ensure physical security of HSMs and verify firmware integrity upon receipt.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Physical (P) – The attacker must have physical access to the device.
- Attack Complexity (AC): Low (L) – No special conditions or complex steps are required.
- Privileges Required (PR): None (N) – No authentication is needed to access the BIOS.
- User Interaction (UI): None (N) – No user action is required.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): High (H) – Full access to cryptographic keys and data.
- Integrity (I): High (H) – Firmware and boot process can be altered.
- Availability (A): High (H) – Device can be rendered inoperable or backdoored.
CVSS Score: 6.8 (Medium) – While the impact is high, the requirement for physical access lowers the overall score.
Threat Level: High for environments with physical access risks (e.g., data centers, co-location facilities). Low for remote-only threats.
Deep Dive & Mechanics
The vulnerability lies in the BIOS/UEFI configuration of the affected Entrust nShield HSM models. The BIOS menu, which controls low-level hardware settings such as boot order, secure boot, and firmware updates, is accessible without any password prompt. This is a classic case of CWE-306 (Missing Authentication for Critical Function).
Attack Flow:
- Physical Access: The attacker gains physical access to the HSM (e.g., during maintenance, shipping, or insider threat).
- BIOS Entry: During boot, the attacker presses the designated key (e.g., F2, Del) to enter the BIOS setup.
- No Authentication: The BIOS menu opens without any password challenge.
- Malicious Actions: The attacker can:
- Disable Secure Boot to allow unsigned firmware.
- Change boot order to boot from a malicious USB drive.
- Modify firmware settings to weaken cryptographic operations.
- Install a persistent backdoor in the firmware.
- Persistence: The attacker can re-enable Secure Boot with a custom key to maintain stealth.
Impact: The HSM is no longer a trusted root of trust. All cryptographic keys managed by the device are considered compromised.
Vulnerable vs. Patched Code
Since this is a firmware/BIOS configuration issue, there is no "code" to compare in the traditional sense. The vulnerability is the absence of a password prompt in the BIOS menu.
Vulnerable Configuration:
- BIOS setup utility has no password set.
- Any user can access and modify all settings.
Patched Configuration (Expected):
- BIOS setup utility requires a password.
- Password is set by the administrator and stored securely (e.g., hashed in NVRAM).
- Access to BIOS is denied without the correct password.
Note: As of this report, no official patch has been released by Entrust. The vendor has acknowledged the issue but has not provided a timeline for a fix.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Physical access to the target HSM (nShield Connect XC, 5c, or HSMi).
- Knowledge of the BIOS entry key (typically F2 or Del during boot).
Steps:
- Power on or reboot the HSM.
- Immediately press the BIOS entry key repeatedly until the BIOS menu appears.
- Once in the BIOS, navigate using keyboard arrows.
- Example Actions:
- Disable Secure Boot:
Security -> Secure Boot -> Disabled - Change Boot Order:
Boot -> Boot Option #1 -> [USB Drive] - Set a BIOS password (to lock out the legitimate owner):
Security -> Set Supervisor Password
- Disable Secure Boot:
- Save and exit. The HSM will boot with the modified settings.
Lab Setup:
- Use a virtualized HSM emulator (if available) or a physical test unit.
- Document all changes for forensic purposes.
Blue Team (Defensive)
Detection:
- Monitor for physical access logs (e.g., door access, camera footage).
- Check for unexpected reboots or BIOS entry attempts.
- Use hardware security modules that support remote attestation and firmware integrity verification.
Prevention:
- Implement strict physical access controls (e.g., locked racks, biometric authentication).
- Use tamper-evident seals on HSM chassis.
- Regularly audit BIOS settings and compare against a known-good baseline.
- If possible, set a BIOS password immediately after deployment (though this vulnerability implies it's not currently possible).
Response:
- If unauthorized BIOS access is suspected, immediately isolate the HSM from the network.
- Perform a full cryptographic key rotation.
- Contact Entrust support for guidance on firmware reflash and integrity check.
Indicators of Compromise (IOCs)
- BIOS Settings Change: Unexpected changes to boot order, Secure Boot status, or BIOS password.
- Physical Tampering: Broken tamper-evident seals, scratches around chassis screws.
- Firmware Hash Mismatch: The hash of the current firmware does not match the vendor's published hash.
- Unexpected Reboots: The HSM reboots without a scheduled maintenance window.
- New USB Devices: Logs showing a USB device connected during boot (if logging is enabled).
Detection Engineering
YARA Rule
rule CVE_2025_59704_BIOS_Access {
meta:
description = "Detects log entries indicating BIOS access on Entrust nShield HSM"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-59704"
strings:
$bios_entry = "BIOS Setup entered" nocase
$bios_change = "BIOS setting changed" nocase
$bios_password = "BIOS password" nocase
condition:
any of them
}
Sigma Rule
title: Entrust nShield HSM BIOS Access Detected
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects log entries indicating unauthorized BIOS access on Entrust nShield HSM
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-59704
logsource:
product: entrust
service: nshield
detection:
selection:
EventID: 1001 # Example event ID for BIOS access
Message|contains: 'BIOS'
condition: selection
falsepositives:
- Authorized maintenance personnel
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-59704 - Entrust nShield HSM BIOS Access Attempt"; flow:to_server; content:"BIOS"; nocase; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Physical Security: Restrict physical access to HSMs to only authorized personnel. Use locked racks and CCTV monitoring.
- Firmware Integrity: Verify the firmware hash against Entrust's published values. If mismatched, reflash with a known-good image.
- BIOS Password: If the device supports it, set a BIOS password immediately. (Note: This vulnerability implies it may not be possible, but check for firmware updates.)
Long-Term Fix:
- Await an official firmware update from Entrust that enforces BIOS password protection.
- Consider replacing affected models with newer hardware that has proper BIOS authentication.
Workaround:
- Implement a boot-time authentication script (if the HSM supports custom scripts) that checks for BIOS tampering.
- Use a hardware security module that supports remote attestation to verify firmware integrity at boot.
Valters IT Signature: This report is provided for educational and defensive purposes. Organizations should assess their exposure and take appropriate action. For further assistance, contact Valters IT.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.