CVE-2022-23645: CWE-125: Out-of-bounds Read in stefanberger swtpm
swtpm is a libtpms-based TPM emulator with socket, character device, and Linux CUSE interface. Versions prior to 0.5.3, 0.6.2, and 0.7.1 are vulnerable to out-of-bounds read. A specially crafted header of swtpm's state, where the blobheader's hdrsize indicator has an invalid value, may cause an out-of-bounds access when the byte array representing the state of the TPM is accessed. This will likely crash swtpm or prevent it from starting since the state cannot be understood. Users should upgrade to swtpm v0.5.3, v0.6.2, or v0.7.1 to receive a patch. There are currently no known workarounds.
AI Analysis
Technical Summary
CVE-2022-23645 is a medium-severity vulnerability classified as an out-of-bounds read (CWE-125) in the swtpm software, which is a TPM (Trusted Platform Module) emulator based on libtpms. swtpm provides TPM functionality through socket, character device, and Linux CUSE interfaces, enabling virtualized environments and software relying on TPM features to emulate hardware TPMs. The vulnerability affects swtpm versions prior to 0.5.3, versions from 0.6.0 up to but not including 0.6.2, and version 0.7.0. The root cause is an invalid hdrsize value in the blobheader of the TPM state representation. When swtpm attempts to parse a specially crafted TPM state blob with a malformed header, it performs an out-of-bounds read on the byte array representing the TPM state. This can cause the swtpm process to crash or fail to start because it cannot correctly interpret the TPM state data. Since TPM state is critical for TPM operation, this failure impacts availability of the TPM emulator service. There are no known workarounds, and the only remediation is upgrading to patched versions 0.5.3, 0.6.2, or 0.7.1 where the issue is fixed. No exploits have been reported in the wild to date. The vulnerability does not appear to allow arbitrary code execution or direct confidentiality or integrity breaches, but denial of TPM service could disrupt dependent systems or virtual machines relying on TPM functionality for security operations such as key storage, attestation, or secure boot.
Potential Impact
For European organizations, the impact of this vulnerability primarily concerns environments that utilize TPM emulation via swtpm, such as virtualized infrastructures, cloud service providers, and enterprises using TPM-backed security features in virtual machines. The out-of-bounds read can cause swtpm to crash or fail to initialize, leading to TPM unavailability. This can disrupt security-critical operations including cryptographic key management, platform integrity verification, and secure boot processes that depend on TPM functionality. Organizations relying on TPM emulation for compliance, secure credential storage, or trusted computing may face operational interruptions or degraded security assurances. While the vulnerability does not directly expose sensitive data or allow privilege escalation, the denial of TPM service could indirectly weaken security postures or cause downtime in environments where TPM is integral. Given the lack of known exploits, the immediate risk is moderate, but unpatched systems remain vulnerable to potential future exploitation or accidental crashes triggered by malformed TPM state data.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should prioritize upgrading swtpm to versions 0.5.3, 0.6.2, or 0.7.1 as appropriate for their deployment. This is the only effective remediation since no workarounds exist. Organizations should audit their environments to identify all instances of swtpm, including those embedded in virtualization platforms or cloud infrastructure, and verify the version in use. Automated patch management tools can help ensure timely updates. Additionally, organizations should implement monitoring of swtpm processes and logs to detect crashes or failures indicative of malformed TPM state data. Where possible, restrict access to TPM state files and interfaces to trusted administrators and processes to reduce the risk of maliciously crafted state injection. For environments with high availability requirements, consider implementing redundancy or failover mechanisms for TPM emulation services to minimize disruption. Finally, maintain awareness of vendor advisories and community reports for any emerging exploits or additional mitigations.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Estonia, Ireland
CVE-2022-23645: CWE-125: Out-of-bounds Read in stefanberger swtpm
Description
swtpm is a libtpms-based TPM emulator with socket, character device, and Linux CUSE interface. Versions prior to 0.5.3, 0.6.2, and 0.7.1 are vulnerable to out-of-bounds read. A specially crafted header of swtpm's state, where the blobheader's hdrsize indicator has an invalid value, may cause an out-of-bounds access when the byte array representing the state of the TPM is accessed. This will likely crash swtpm or prevent it from starting since the state cannot be understood. Users should upgrade to swtpm v0.5.3, v0.6.2, or v0.7.1 to receive a patch. There are currently no known workarounds.
AI-Powered Analysis
Technical Analysis
CVE-2022-23645 is a medium-severity vulnerability classified as an out-of-bounds read (CWE-125) in the swtpm software, which is a TPM (Trusted Platform Module) emulator based on libtpms. swtpm provides TPM functionality through socket, character device, and Linux CUSE interfaces, enabling virtualized environments and software relying on TPM features to emulate hardware TPMs. The vulnerability affects swtpm versions prior to 0.5.3, versions from 0.6.0 up to but not including 0.6.2, and version 0.7.0. The root cause is an invalid hdrsize value in the blobheader of the TPM state representation. When swtpm attempts to parse a specially crafted TPM state blob with a malformed header, it performs an out-of-bounds read on the byte array representing the TPM state. This can cause the swtpm process to crash or fail to start because it cannot correctly interpret the TPM state data. Since TPM state is critical for TPM operation, this failure impacts availability of the TPM emulator service. There are no known workarounds, and the only remediation is upgrading to patched versions 0.5.3, 0.6.2, or 0.7.1 where the issue is fixed. No exploits have been reported in the wild to date. The vulnerability does not appear to allow arbitrary code execution or direct confidentiality or integrity breaches, but denial of TPM service could disrupt dependent systems or virtual machines relying on TPM functionality for security operations such as key storage, attestation, or secure boot.
Potential Impact
For European organizations, the impact of this vulnerability primarily concerns environments that utilize TPM emulation via swtpm, such as virtualized infrastructures, cloud service providers, and enterprises using TPM-backed security features in virtual machines. The out-of-bounds read can cause swtpm to crash or fail to initialize, leading to TPM unavailability. This can disrupt security-critical operations including cryptographic key management, platform integrity verification, and secure boot processes that depend on TPM functionality. Organizations relying on TPM emulation for compliance, secure credential storage, or trusted computing may face operational interruptions or degraded security assurances. While the vulnerability does not directly expose sensitive data or allow privilege escalation, the denial of TPM service could indirectly weaken security postures or cause downtime in environments where TPM is integral. Given the lack of known exploits, the immediate risk is moderate, but unpatched systems remain vulnerable to potential future exploitation or accidental crashes triggered by malformed TPM state data.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should prioritize upgrading swtpm to versions 0.5.3, 0.6.2, or 0.7.1 as appropriate for their deployment. This is the only effective remediation since no workarounds exist. Organizations should audit their environments to identify all instances of swtpm, including those embedded in virtualization platforms or cloud infrastructure, and verify the version in use. Automated patch management tools can help ensure timely updates. Additionally, organizations should implement monitoring of swtpm processes and logs to detect crashes or failures indicative of malformed TPM state data. Where possible, restrict access to TPM state files and interfaces to trusted administrators and processes to reduce the risk of maliciously crafted state injection. For environments with high availability requirements, consider implementing redundancy or failover mechanisms for TPM emulation services to minimize disruption. Finally, maintain awareness of vendor advisories and community reports for any emerging exploits or additional mitigations.
Affected Countries
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-01-19T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9842c4522896dcbf25de
Added to database: 5/21/2025, 9:09:22 AM
Last enriched: 6/23/2025, 4:03:11 PM
Last updated: 2/7/2026, 11:43:31 AM
Views: 34
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
CVE-2026-2083: SQL Injection in code-projects Social Networking Site
MediumCVE-2026-2082: OS Command Injection in D-Link DIR-823X
MediumCVE-2026-2080: Command Injection in UTT HiPER 810
HighCVE-2026-2079: Improper Authorization in yeqifu warehouse
MediumCVE-2026-1675: CWE-1188 Initialization of a Resource with an Insecure Default in brstefanovic Advanced Country Blocker
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.