Skip to main content

CVE-2025-49133: CWE-125: Out-of-bounds Read in stefanberger libtpms

Medium
VulnerabilityCVE-2025-49133cvecve-2025-49133cwe-125
Published: Tue Jun 10 2025 (06/10/2025, 19:46:27 UTC)
Source: CVE Database V5
Vendor/Project: stefanberger
Product: libtpms

Description

Libtpms is a library that targets the integration of TPM functionality into hypervisors, primarily into Qemu. Libtpms, which is derived from the TPM 2.0 reference implementation code published by the Trusted Computing Group, is prone to a potential out of bounds (OOB) read vulnerability. The vulnerability occurs in the ‘CryptHmacSign’ function with an inconsistent pairing of the signKey and signScheme parameters, where the signKey is ALG_KEYEDHASH key and inScheme is an ECC or RSA scheme. The reported vulnerability is in the ‘CryptHmacSign’ function, which is defined in the "Part 4: Supporting Routines – Code" document, section "7.151 - /tpm/src/crypt/CryptUtil.c ". This vulnerability can be triggered from user-mode applications by sending malicious commands to a TPM 2.0/vTPM (swtpm) whose firmware is based on an affected TCG reference implementation. The effect on libtpms is that it will cause an abort due to the detection of the out-of-bounds access, thus for example making a vTPM (swtpm) unavailable to a VM. This vulnerability is fixed in 0.7.12, 0.8.10, 0.9.7, and 0.10.1.

AI-Powered Analysis

AILast updated: 07/10/2025, 21:32:49 UTC

Technical Analysis

CVE-2025-49133 is a medium-severity vulnerability identified in the libtpms library, which is used to integrate TPM (Trusted Platform Module) functionality into hypervisors, primarily QEMU. Libtpms is derived from the TPM 2.0 reference implementation by the Trusted Computing Group. The vulnerability is an out-of-bounds (OOB) read occurring in the CryptHmacSign function, specifically when there is an inconsistent pairing between the signKey and signScheme parameters. The issue arises when the signKey is an ALG_KEYEDHASH key but the inScheme is an ECC or RSA scheme. This mismatch leads to an out-of-bounds read in the CryptHmacSign function, located in the CryptUtil.c source file as per the TPM specification Part 4, section 7.151. The vulnerability can be triggered by user-mode applications sending crafted commands to a TPM 2.0 or virtual TPM (vTPM) implementation such as swtpm that uses the affected libtpms versions. The practical impact is that the out-of-bounds read causes the libtpms process to abort, resulting in the unavailability of the vTPM device to the virtual machine relying on it. This can lead to denial of service (DoS) conditions for VMs that depend on TPM functionality for security operations such as attestation or key management. The affected versions are 0.7.11, 0.8.9, 0.9.6, and 0.10.0. The issue has been fixed in libtpms versions 0.7.12, 0.8.10, 0.9.7, and 0.10.1. The CVSS v3.1 base score is 5.9, reflecting a medium severity with a local attack vector, low attack complexity, requiring low privileges and user interaction, and impacting availability but not confidentiality or integrity. No known exploits are reported in the wild as of the publication date.

Potential Impact

For European organizations, this vulnerability primarily poses a risk of denial of service on virtualized environments that utilize TPM functionality via libtpms, especially those running QEMU-based hypervisors with swtpm vTPM implementations. Organizations relying on TPM for secure key storage, attestation, or cryptographic operations in cloud or private data centers could experience interruptions in these security services, potentially affecting compliance with regulations such as GDPR that mandate strong security controls. The unavailability of vTPM could disrupt automated security workflows or VM provisioning processes. While the vulnerability does not allow data leakage or privilege escalation, the loss of TPM services could degrade the security posture and trustworthiness of virtualized workloads. This is particularly relevant for sectors with high security requirements such as finance, healthcare, and government institutions across Europe. The requirement for local access and user interaction limits remote exploitation risks, but insider threats or compromised user accounts could trigger the vulnerability. The medium severity suggests that while the impact is significant, it is not catastrophic, but organizations should prioritize patching to maintain operational continuity and security assurances.

Mitigation Recommendations

European organizations should immediately verify if their virtualization infrastructure uses affected versions of libtpms (0.7.11, 0.8.9, 0.9.6, or 0.10.0) and upgrade to the fixed versions (0.7.12, 0.8.10, 0.9.7, or 0.10.1) as a primary mitigation step. Since the vulnerability requires user interaction and local privileges, organizations should also enforce strict access controls and monitoring on systems hosting vTPM services to prevent unauthorized command injection. Implementing robust user authentication and limiting the number of users with access to TPM management interfaces can reduce exploitation risk. Additionally, monitoring logs for abnormal TPM command sequences or unexpected process aborts can help detect exploitation attempts. For environments where immediate patching is not feasible, consider isolating or restricting access to vTPM services and applying virtualization security best practices such as VM isolation and network segmentation. Regularly auditing TPM usage and updating hypervisor and TPM-related components will help maintain security hygiene. Finally, coordinate with cloud service providers to ensure their TPM implementations are patched if using managed virtualization services.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-06-02T10:39:41.633Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 684891ea48de16fa2fcfc18b

Added to database: 6/10/2025, 8:13:30 PM

Last enriched: 7/10/2025, 9:32:49 PM

Last updated: 8/12/2025, 1:33:23 AM

Views: 18

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats