# CVE-2023-22745: Buffer Overlow in TSS2\_RC\_Decode in tpm2-tss

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.4
- **CVSS:** 6.4 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: High; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.36% (percentile 22, 2026-11-26)
- **CWE:** CWE-120
- **Published:** 2023-01-19T22:12:40.208Z
- **Modified:** 2026-06-17T05:36:05.093Z

## Who should check

- Anyone running tpm2-software tpm2-tss \< 4.0.1; \< 3.2.2-rc0

## Description

tpm2-tss is an open source software implementation of the Trusted Computing Group (TCG) Trusted Platform Module (TPM) 2 Software Stack (TSS2). In versions prior to 4.1.0-rc0, 4.0.1, and 3.2.2-rc1, \`Tss2\_RC\_SetHandler\` and \`Tss2\_RC\_Decode\` both index into \`layer\_handler\` with an 8 bit layer number, but the array only has \`TPM2\_ERROR\_TSS2\_RC\_LAYER\_COUNT\` entries, so trying to add a handler for higher-numbered layers or decode a response code with such a layer number reads/writes past the end of the buffer. This Buffer overrun, could result in arbitrary code execution. An example attack would be a MiTM bus attack that returns 0xFFFFFFFF for the RC. Given the common use case of TPM modules an attacker must have local access to the target machine with local system privileges which allows access to the TPM system. Usually TPM access requires administrative privilege. Versions 4.1.0-rc0, 4.0.1, and 3.2.2-rc1 fix the issue.

## Affected and fixed versions

- tpm2-software tpm2-tss: \< 4.0.1; \< 3.2.2-rc0 (cvelist)

## Mitigation

- Upgrade tpm2-tss to 3.2.2-rc0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-22745. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-22745.md
Affected: tpm2-software tpm2-tss < 4.0.1; < 3.2.2-rc0
Fixed in: tpm2-software tpm2-tss 4.0.1, tpm2-software tpm2-tss 3.2.2-rc0

Steps:
1. Search this machine and project for tpm2-software tpm2-tss: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-22745 being exploited?

There is no confirmed exploitation: CVE-2023-22745 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.36% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-22745?

Medium: CVSS 6.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2023-22745?

tpm2-software tpm2-tss \< 4.0.1; \< 3.2.2-rc0.

### Is there a fix for CVE-2023-22745?

Yes. Fixed in tpm2-software tpm2-tss 4.0.1, tpm2-software tpm2-tss 3.2.2-rc0. Upgrade tpm2-tss to 3.2.2-rc0 or later.

### How do I check if I'm affected by CVE-2023-22745?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/tpm2-software/tpm2-tss/security/advisories/GHSA-4j3v-fh23-vx67>
- patch: <https://github.com/tpm2-software/tpm2-tss/commit/306490c8d848c367faa2d9df81f5e69dab46ffb5>
- patch: <https://github.com/tpm2-software/tpm2-tss/commit/49107d65d5c7be430671398416bbd89dae4e34e7>
- patch: <https://github.com/tpm2-software/tpm2-tss/commit/7ab42953216adec046d000a5e3085f3ee5e9cabf>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-22745>

HTML: <https://flawdb.com/CVE-2023-22745> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-22745>
