{"id":"CVE-2026-40097","aliases":["CVE-2026-40097","GHSA-9qq8-cgcv-qmc9","GO-2026-5297"],"related":[],"kind":"vulnerability","state":"published","title":"Step CA affected by an index out of bounds panic in TPM attestation EKU validation","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"# 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Step CA affected by an index out of bounds panic in TPM attestation EKU validation in github.com/smallstep/certificates","format":"markdown","source":"go"},{"lang":"es","text":"Step CA es una autoridad de certificación en línea para la gestión segura y automatizada de certificados para DevOps. Desde la versión 0.24.0 hasta antes de la 0.30.0-rc3, un atacante puede desencadenar un pánico por índice fuera de límites en Step CA al enviar un certificado de clave de atestación (AK) manipulado con una extensión de Uso Extendido de Clave (EKU) vacía durante la atestación de dispositivo TPM. Al procesar un desafío ACME device-attest-01 utilizando la atestación TPM, Step CA valida que el certificado AK contenga el OID de Uso Extendido de Clave tcg-kp-AIKCertificate. Durante esta validación, el valor de la extensión EKU se decodifica de su representación ASN.1 y se verifica el primer elemento. Un certificado manipulado podría incluir una extensión EKU que se decodifica a una secuencia vacía, causando que el código entre en pánico al acceder al primer elemento del slice vacío. Esta vulnerabilidad solo es alcanzable cuando se configura un desafío ACME device-attest-01 con atestación TPM. Las implementaciones que no utilizan la atestación de dispositivo TPM no se ven afectadas. Esta vulnerabilidad está corregida en la versión 0.30.0-rc3.","source":"nvd"}],"published":"2026-04-10T16:34:53.330Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"}],"cwes":["CWE-129"],"affected":[{"ranges":[{"version":">= 0.24.0, < 0.30.0-rc3","status":"affected"}],"vendor":"smallstep","product":"certificates","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.24.0","status":"affected","fixed":"0.30.0"}],"ecosystem":"Go","package":"github.com/smallstep/certificates","purl":"pkg:golang/github.com/smallstep/certificates","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.24.0","status":"affected","fixed":"0.30.0"}],"ecosystem":"Go","package":"github.com/smallstep/certificates","purl":"pkg:golang/github.com/smallstep/certificates","source":"go"},{"ranges":[{"status":"affected","introduced":"0.24.0","fixed":"0.30.0"},{"status":"affected","version":"0.30.0"},{"status":"affected","version":"0.30.0"}],"vendor":"smallstep","product":"step-ca","cpe":"cpe:2.3:a:smallstep:step-ca:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/smallstep/certificates/security/advisories/GHSA-9qq8-cgcv-qmc9","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/smallstep/certificates/pull/2569","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/smallstep/certificates/commit/ffd31ac0a87e03b0224cb8363094bfe602242888","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/smallstep/certificates/releases/tag/v0.30.0","tags":["product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40097","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/smallstep/certificates","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-10T18:30:05.878Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40097","url":"https://www.cve.org/CVERecord?id=CVE-2026-40097","licence":"CVE Terms of Use","modified":"2026-04-10T18:30:15.176Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9qq8-cgcv-qmc9","url":"https://github.com/advisories/GHSA-9qq8-cgcv-qmc9","licence":"CC-BY-4.0","modified":"2026-06-25T19:56:06.351Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5297","url":"https://pkg.go.dev/vuln/GO-2026-5297","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:30.538Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40097","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40097","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"}],"updatedAt":"2026-11-25T22:59:18.526Z","epss":{"score":0.00295,"percentile":0.14554,"date":"2026-11-30T12:00:22.000Z"}}