# CVE-2026-40097: Smallstep Step CA index out-of-bounds panic in TPM attestation

Source: https://junglewise.ai/threats/cve-2026-40097-smallstep-step-ca-index-out-of-bounds-panic-in-tpm-attestation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-10. Updated: 2026-05-10  
License: CC BY 4.0 with a link back

CVE-2026-40097 · Severity: low · CVSS 3.7 · Published 2026-04-10

Smallstep Step CA is a certificate authority used to manage secure identities for devices and services. A vulnerability in its TPM device attestation process allows a remote attacker to crash the service by providing a specially crafted certificate. This results in a denial-of-service, preventing the system from issuing or renewing certificates until it is restarted.

Technologies: [github.com/smallstep/certificates (Go)](https://junglewise.ai/threats/technologies/github-com-smallstep-certificates). Vendors: [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-40097 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40097 being exploited in the wild.

**How severe is CVE-2026-40097?** Low severity, with a CVSS score of 3.7, published 10 April 2026.

**Which products and versions are affected?** github.com/smallstep/certificates (Go) >= 0.24.0, < 0.30.0, SEMVER:introduced=0.24.0,fixed=0.30.0; Smallstep Certificates >= 0.24.0, < 0.30.0.

**Is there a fix for CVE-2026-40097?** Yes. github.com/smallstep/certificates (Go): upgrade to 0.30.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40097 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40097?** Check whether you run github.com/smallstep/certificates (Go) or Smallstep Certificates at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/smallstep/certificates (Go): upgrade to 0.30.0 or later

  ```sh
  go get github.com/smallstep/certificates@v0.30.0
  ```


## Technical details

An index out-of-bounds vulnerability exists in Step CA's TPM attestation EKU validation logic. When processing a 'device-attest-01' ACME challenge, the `validateAKCertificateExtendedKeyUsage` function decodes the ASN.1 representation of the Extended Key Usage (EKU) extension. If a crafted certificate contains an EKU extension that decodes to an empty sequence, the code attempts to access the first element of the empty slice, triggering a Go panic. This vulnerability is only reachable if TPM device attestation is enabled. The issue is fixed in version 0.30.0 by adding a proper bounds check.

## Affected products

- Smallstep certificates >= 0.24.0, < 0.30.0

## Identifiers

- CVE-2026-40097
- GHSA-9qq8-cgcv-qmc9
- GO-2026-5297

## Timeline

- 2026-04-10: disclosed
- 2026-04-10: advisory
- 2026-04-10: patched: Fixed in version 0.30.0

## References

- [https://api.github.com/users/1seal](https://api.github.com/users/1seal)
- [https://github.com/1seal](https://github.com/1seal)
- [https://api.github.com/users/1seal/gists%7B/gist_id%7D](https://api.github.com/users/1seal/gists%7B/gist_id%7D)
- [https://api.github.com/users/1seal/repos](https://api.github.com/users/1seal/repos)
- [https://avatars.githubusercontent.com/u/239602944?v=4](https://avatars.githubusercontent.com/u/239602944?v=4)
- [https://api.github.com/users/1seal/events%7B/privacy%7D](https://api.github.com/users/1seal/events%7B/privacy%7D)

## Related threats

- [step-ca has Unauthenticated Certificate Issuance via SCEP UpdateReq (MessageType=18)](https://junglewise.ai/threats/cve-2026-30836-step-ca-has-unauthenticated-certificate-issuance-via-scep)
- [GO-2025-4180 - Step CA Has Authorization Bypass in ACME and SCEP Provisioners in github.com/smallstep/certificates](https://junglewise.ai/threats/cve-2025-44005-step-ca-has-authorization-bypass-in-acme-and-scep-provisioners)
- [GO-2025-4181 - step-ca Has Improper Authorization Check for SSH Certificate Revocation in github.com/smallstep/certificates](https://junglewise.ai/threats/cve-2025-66406-step-ca-has-improper-authorization-check-for-ssh-certificate)
