# CVE-2026-40097: Step CA affected by an index out of bounds panic in TPM attestation EKU validation

> An attacker can cause a denial of service in Step CA by sending a crafted TPM attestation certificate with an empty EKU extension, triggering a panic.

- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Apr 2026
- **Updated:** 10 Apr 2026
- **Also known as:** CLEANSTART-2026-LF51380, CLEANSTART-2026-XI87503, GHSA-9qq8-cgcv-qmc9, GO-2026-5297, MINI-c5wr-7mfx-jwmr, MINI-j347-365p-qh3g

## What is CVE-2026-40097?

CVE-2026-40097 is a low-severity denial of service vulnerability in smallstep certificates, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Step CA is an online certificate authority for secure, automated certificate management for DevOps. From 0.24.0 to before 0.30.0-rc3, an attacker can trigger an index out-of-bounds panic in Step CA by sending a crafted attestation key (AK) certificate with an empty Extended Key Usage (EKU) extension during TPM device attestation. When processing a device-attest-01 ACME challenge using TPM attestation, Step CA validates that the AK certificate contains the tcg-kp-AIKCertificate Extended Key Usage OID. During this validation, the EKU extension value is decoded from its ASN.1 representation and the first element is checked. A crafted certificate could include an EKU extension that decodes to an empty sequence, causing the code to panic when accessing the first element of the empty slice. This vulnerability is only reachable when a device-attest-01 ACME challenge with TPM attestation is configured. Deployments not using TPM device attestation are not affected. This vulnerability is fixed in 0.30.0-rc3.

Weakness: CWE-129 (Improper Validation of Array Index)

## Which versions are affected by CVE-2026-40097?

3 open source packages ship an affected version, including github.com/smallstep/certificates. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/smallstep/certificates` | Go | From 0.24.0 | 0.30.0 |
| `github.com/smallstep/certificates` | Go | From 0.24.0 | 0.30.0 |
| `github.com/smallstep/certificates` | Go | From 0.24.0 | 0.30.0 |

Products: Smallstep Step-Ca.

## How do I fix CVE-2026-40097?

Upgrade github.com/smallstep/certificates to 0.30.0 or later.

## Is CVE-2026-40097 being exploited?

There is no known exploitation of CVE-2026-40097 in the wild and no public exploit code.

## Other vulnerabilities in smallstep certificates

- [CVE-2026-30836](https://insights.sbomify.com/CVE-2026-30836/): Step CA: Unauthenticated Certificate Issuance via SCEP UpdateReq (MessageType=18) (critical 10.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-40097 and fix it if it is affected.

What it is: CVE-2026-40097 is a low-severity denial of service vulnerability in smallstep certificates, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-40097 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/smallstep/certificates (Go): affected from 0.24.0; fixed in 0.30.0
- github.com/smallstep/certificates (Go): affected from 0.24.0; fixed in 0.30.0
- github.com/smallstep/certificates (Go): affected from 0.24.0; fixed in 0.30.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-40097/ (Markdown: https://insights.sbomify.com/CVE-2026-40097/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-40097
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40097
- OSV: https://osv.dev/vulnerability/CVE-2026-40097

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-40097/
Summaries are generated and may contain mistakes; the official description above is the record.
