CVE-2024-29040: CWE-502: Deserialization of Untrusted Data in tpm2-software tpm2-tss
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland
CVE-2024-29040: CWE-502: Deserialization of Untrusted Data in tpm2-software 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
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.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
U.S. Sanctions 10 North Korean Entities for Laundering $12.7M in Crypto and IT Fraud
MediumMysterious 'SmudgedSerpent' Hackers Target U.S. Policy Experts Amid Iran–Israel Tensions
MediumCVE-2025-12497: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in averta Premium Portfolio Features for Phlox theme
HighCVE-2025-11745: CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in spacetime Ad Inserter – Ad Manager & AdSense Ads
MediumNikkei Says 17,000 Impacted by Data Breach Stemming From Slack Account Hack
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.