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

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). 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.