GHSA-W3VW-CCC5-QR8V

GHSA-W3VW-CCC5-QR8V is a medium-severity security vulnerability in tss-esapi (rust), affecting versions >= 7.0.0, < 7.1.0. It is fixed in 7.1.0, 6.1.2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Use After Free in Context::startauthsession

Workarounds

There is no workaround that achieves the same functionality.

References

For more information on the cause of the issue and the fix, see this PR.

For more details about the TPM2_StartAuthSession command see section 11.1 of the TPM spec, part 3, and section 19.6.3 of part 1 of the same spec for more information regarding session nonces.

For more information

If you have any questions or comments about this advisory:

Impact

This issue only applies to applications starting authorization sessions using an explicit initial nonce.

When Context::start_auth_session was called with a nonce argument value of Some(...), the nonce pointer passed down through FFI to Esys_StartAuthSession would be a dangling pointer, left over from a defunct instance of TPM2B_NONCE. This could lead to an incorrect value being used as a nonce, though whether that value is controllable is unclear (so should be assumed as possible). The error became apparent due to changes in v1.61.0 of the Rust compiler.

Logs indicating a failure due to this issue (with the 1.61.0 version of the Rust toolchain) look as follows:

2022-05-24T01:04:41.9131341Z WARNING:esys:src/tss2-esys/api/Esys_StartAuthSession.c:390:Esys_StartAuthSession_Finish() Received TPM Error 
2022-05-24T01:04:41.9132192Z ERROR:esys:src/tss2-esys/api/Esys_StartAuthSession.c:136:Esys_StartAuthSession() Esys Finish ErrorCode (0x000001d5) 
2022-05-24T01:04:41.9145124Z [2022-05-24T01:04:41Z ERROR tss_esapi::context::tpm_commands::session_commands] Error when creating a session: structure is the wrong size (associated with parameter number 1)
2022-05-24T01:04:41.9153816Z thread 'main' panicked at 'Call to start_auth_session failed: Tss2Error(FormatOne(FormatOneResponseCode { .0: 469, error_number: 21, parameter: true, format_selector: true, number: 1 }))', tss-esapi/tests/integration_tests/context_tests/tpm_commands/enhanced_authorization_ea_commands_tests.rs:870:14

Affected versions

tss-esapi (>= 7.0.0, < 7.1.0) tss-esapi (< 6.1.2)

Security releases

tss-esapi → 7.1.0 (rust) tss-esapi → 6.1.2 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The issue has been patched in versions 6 and 7 of the tss-esapi crate. Please update to 7.1.0 or 6.1.2.

Frequently Asked Questions

  1. What is GHSA-W3VW-CCC5-QR8V? GHSA-W3VW-CCC5-QR8V is a medium-severity security vulnerability in tss-esapi (rust), affecting versions >= 7.0.0, < 7.1.0. It is fixed in 7.1.0, 6.1.2.
  2. Which versions of tss-esapi are affected by GHSA-W3VW-CCC5-QR8V? tss-esapi (rust) versions >= 7.0.0, < 7.1.0 is affected.
  3. Is there a fix for GHSA-W3VW-CCC5-QR8V? Yes. GHSA-W3VW-CCC5-QR8V is fixed in 7.1.0, 6.1.2. Upgrade to this version or later.
  4. Is GHSA-W3VW-CCC5-QR8V exploitable, and should I be worried? Whether GHSA-W3VW-CCC5-QR8V is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-W3VW-CCC5-QR8V is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-W3VW-CCC5-QR8V?
    • Upgrade tss-esapi to 7.1.0 or later
    • Upgrade tss-esapi to 6.1.2 or later

Stop the waste.
Protect your environment with Kodem.