Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-29040: CWE-502: Deserialization of Untrusted Data in tpm2-software tpm2-tss

0
Medium
VulnerabilityCVE-2024-29040cvecve-2024-29040cwe-502
Published: Fri Jun 28 2024 (06/28/2024, 21:02:04 UTC)
Source: CVE Database V5
Vendor/Project: tpm2-software
Product: tpm2-tss

Description

This repository hosts source code implementing the Trusted Computing Group's (TCG) TPM2 Software Stack (TSS). The JSON Quote Info returned by Fapi_Quote has to be deserialized by Fapi_VerifyQuote to the TPM Structure `TPMS_ATTEST`. For the field `TPM2_GENERATED magic` of this structure any number can be used in the JSON structure. The verifier can receive a state which does not represent the actual, possibly malicious state of the device under test. The malicious device might get access to data it shouldn't, or can use services it shouldn't be able to. This issue has been patched in version 4.1.0.

AI-Powered Analysis

AILast updated: 11/04/2025, 17:49:48 UTC

Technical Analysis

CVE-2024-29040 is a vulnerability categorized under CWE-502 (Deserialization of Untrusted Data) found in the tpm2-tss component of the tpm2-software stack, which implements the Trusted Computing Group's TPM2 Software Stack. The vulnerability specifically concerns the deserialization process of the JSON Quote Info returned by the Fapi_Quote function. This JSON data is deserialized by Fapi_VerifyQuote into the TPM structure TPMS_ATTEST. Within this structure, the TPM2_GENERATED magic field is expected to have a specific value to represent a valid TPM-generated attestation. However, the deserialization process does not enforce strict validation on this field, allowing any number to be used in the JSON input. This flaw can cause the verifier to accept a manipulated or malicious state that does not reflect the actual device state. Consequently, a malicious device could exploit this to gain unauthorized access to sensitive data or use TPM services it should not be permitted to access. The vulnerability affects all versions of tpm2-tss prior to 4.1.0, where the issue has been addressed and patched. The CVSS v3.1 score is 4.3 (medium severity), with an attack vector limited to local access (AV:L), low attack complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and a scope change (S:C). The impact is limited to confidentiality loss (C:L) without affecting integrity or availability. There are no known exploits in the wild at the time of publication. This vulnerability highlights the risks associated with improper deserialization of untrusted data in security-critical components like TPM software stacks.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to the confidentiality of sensitive information protected by TPM modules using vulnerable versions of tpm2-tss. Since TPMs are widely used for hardware-based security functions such as secure boot, disk encryption key protection, and platform attestation, exploitation could allow a malicious device or insider to bypass security assurances, potentially exposing cryptographic keys or sensitive attestation data. This could undermine trust in device integrity and compromise secure authentication or encryption processes. Although the attack requires local access, environments with shared or less controlled physical access, such as manufacturing, repair centers, or multi-tenant data centers, may be more vulnerable. The vulnerability does not affect integrity or availability, so it is less likely to cause system outages or data tampering. However, the confidentiality breach could lead to further attacks or data leaks. European organizations relying on TPM-based security for compliance with regulations like GDPR or NIS2 should prioritize addressing this vulnerability to maintain data protection standards.

Mitigation Recommendations

The primary mitigation is to upgrade all affected tpm2-tss installations to version 4.1.0 or later, where the vulnerability has been patched. Organizations should audit their software supply chain and device firmware to identify any use of vulnerable tpm2-tss versions. Implement strict input validation and sanity checks on all TPM-related deserialization processes to ensure that fields like TPM2_GENERATED magic conform to expected values. Limit local access to TPM-enabled devices through physical security controls and restrict administrative privileges to trusted personnel. Employ monitoring and logging of TPM interactions to detect anomalous or suspicious activity that could indicate exploitation attempts. For environments where upgrading is not immediately feasible, consider isolating vulnerable systems or disabling features that rely on Fapi_Quote and Fapi_VerifyQuote functions if possible. Finally, maintain awareness of updates from the tpm2-software project and apply security patches promptly.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2024-03-14T16:59:47.614Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 690a3b4cff58c9332ff06e5a

Added to database: 11/4/2025, 5:43:40 PM

Last enriched: 11/4/2025, 5:49:48 PM

Last updated: 11/5/2025, 1:52:12 PM

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

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