CVE-2026-40097: Github.com/smallstep/certificates Step CA Affected By An Vulnerability

LOW
Advisory Identifier: GHSA-9qq8-cgcv-qmc9
CVSS 3.7
CWE-129
Published
Advisory Summary

CVE-2026-40097 is a LOW (CVSS 3.7) step ca affected by an vulnerability (CWE-129: Improper Validation of Array Index) affecting Github.com/smallstep/certificates libraries in the Go ecosystem. The issue involves step ca affected by an index out of bounds panic in tpm attestation eku validation. Remediation is available by upgrading affected packages to version 0.30.0.

CVE-2026-40097 at a Glance

CVE Identifier CVE-2026-40097
GHSA Identifier GHSA-9qq8-cgcv-qmc9
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-129: Improper Validation of Array Index
Affected Product Github.com/smallstep/certificates
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-40097

To remediate this vulnerability, upgrade all affected Github.com/smallstep/certificates dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/smallstep/certificates fixed: 0.30.0
Upgrade github.com/smallstep/certificates to 0.30.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/smallstep/certificates

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-40097, inspect your project dependencies for Github.com/smallstep/certificates:

inspect dependencies for github.com/smallstep/certificates

Analyze the terminal output to locate any version of Github.com/smallstep/certificates in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.30.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-129: Improper Validation of Array Index, where the product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array. In Github.com/smallstep/certificates, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Summary 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. ## Details 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. ## Mitigations If you are unable to upgrade to v0.30.0 or newer, the attack can be mitigated by disabling or removing any ACME provisioners that use TPM device attestation (device-attest-01). ## Fix In v0.30.0, a bounds check was added to validateAKCertificateExtendedKeyUsage so that an empty EKU sequence is treated as a validation failure rather than causing a panic. ## Acknowledgements This issue was identified and reported by @1seal (Oleh Konko). ## Embargo List If your organization runs Step CA in production and would like advance, embargoed notification of future security updates, visit https://u.step.sm/disclosure to request inclusion on our embargo list. Stay safe, and thank you for helping us keep the ecosystem secure.

CVE-2026-40097 Affected Github.com/smallstep/certificates Versions

1 component(s)
Fixed Versions:
0.30.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/smallstep/certificates
Go
≥ 0.24.0
< 0.30.0
0.30.0

References

Frequently Asked Questions

What is CVE-2026-40097?
CVE-2026-40097 is a security vulnerability in Github.com/smallstep/certificates involving Step CA affected by an index out of bounds panic in TPM attestation EKU validation under CWE-129: Improper Validation of Array Index.
Which Github.com/smallstep/certificates versions are affected?
Affected versions include releases prior to 0.30.0 across affected packages: github.com/smallstep/certificates.
What version fixes CVE-2026-40097?
Upgrading to 0.30.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/smallstep/certificates affected?
Yes, github.com/smallstep/certificates is affected in releases prior to 0.30.0. Upgrade your dependency to 0.30.0 or later.
What is the CVSS score of CVE-2026-40097?
CVE-2026-40097 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-40097?
CVE-2026-40097 is classified under CWE-129: Improper Validation of Array Index (The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index references a valid position within the array.).
How can I check Go dependencies for CVE-2026-40097?
Run the dependency tree command: 'inspect dependencies for github.com/smallstep/certificates'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9qq8-cgcv-qmc9",
  "modified" : "2026-04-10T20:18:08Z",
  "published" : "2026-04-10T20:18:08Z",
  "aliases" : [ "CVE-2026-40097" ],
  "summary" : "Step CA affected by an index out of bounds panic in TPM attestation EKU validation",
  "details" : "# Summary\n\nAn 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.\n\n## Details\n\nWhen 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.\n\nThis 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.\n\n## Mitigations\n\nIf you are unable to upgrade to v0.30.0 or newer, the attack can be mitigated by disabling or removing any ACME provisioners that use TPM device attestation (device-attest-01).\n\n## Fix\n\nIn v0.30.0, a bounds check was added to validateAKCertificateExtendedKeyUsage so that an empty EKU sequence is treated as a validation failure rather than causing a panic.\n\n## Acknowledgements\n\nThis issue was identified and reported by @1seal (Oleh Konko).\n\n## Embargo List\n\nIf your organization runs Step CA in production and would like advance, embargoed notification of future security updates, visit https://u.step.sm/disclosure to request inclusion on our embargo list.\n\nStay safe, and thank you for helping us keep the ecosystem secure.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/smallstep/certificates"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.24.0"
      }, {
        "fixed" : "0.30.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/smallstep/certificates/security/advisories/GHSA-9qq8-cgcv-qmc9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40097"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/smallstep/certificates/pull/2569"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/smallstep/certificates/commit/ffd31ac0a87e03b0224cb8363094bfe602242888"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/smallstep/certificates"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/smallstep/certificates/releases/tag/v0.30.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-129" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-10T20:18:08Z",
    "nvd_published_at" : "2026-04-10T17:17:12Z"
  }
}