CVE-2026-40097: Index Out-of-Bounds Panic in Step CA TPM Attestation
Vulnerability ID: CVE-2026-40097
CVSS Score: 3.7
Published: 2026-04-10
Step CA versions prior to 0.30.0-rc3 contain a vulnerability (CWE-129) where processing a malformed TPM Attestation Key certificate results in a Go runtime panic. This flaw causes a Denial of Service condition when the device-attest-01 ACME challenge is enabled and triggered by an unauthenticated attacker.
TL;DR
A missing bounds check in Step CA's TPM attestation logic allows an attacker to crash the application via an empty Extended Key Usage (EKU) ASN.1 sequence.
Technical Details
- CWE ID: CWE-129
- Attack Vector: Network
- CVSS Score: 3.7
- EPSS Score: 0.0003
- Impact: Denial of Service (DoS)
- Exploit Status: None
- KEV Status: Not Listed
Affected Systems
- smallstep/certificates (Step CA)
-
smallstep/certificates: >= 0.24.0, < 0.30.0-rc3 (Fixed in:
0.30.0-rc3)
Code Analysis
Commit: ffd31ac
Fix index out of bounds panic in validateAKCertificateExtendedKeyUsage
@@ -1250,7 +1250,7 @@ func validateAKCertificateExtendedKeyUsage(c *x509.Certificate) error {
)
for _, ext := range c.Extensions {
if ext.Id.Equal(oidExtensionExtendedKeyUsage) {
- if _, err := asn1.Unmarshal(ext.Value, &ekus); err != nil || !ekus[0].Equal(oidTCGKpAIKCertificate) {
+ if _, err := asn1.Unmarshal(ext.Value, &ekus); err != nil || len(ekus) == 0 || !ekus[0].Equal(oidTCGKpAIKCertificate) {
return errors.New("AK certificate is missing Extended Key Usage value tcg-kp-AIKCertificate (2.23.133.8.3)")
}
valid = true
Mitigation Strategies
- Upgrade the smallstep/certificates package to version 0.30.0 or greater.
- Disable the device-attest-01 ACME challenge in Step CA configuration if TPM attestation is not required.
Remediation Steps:
- Review Step CA configurations to determine if the device-attest-01 challenge is active.
- Plan a maintenance window to update the Step CA binary.
- Download version 0.30.0 or the latest stable release from the official smallstep GitHub repository.
- Deploy the updated binary and restart the CA service.
- Verify service stability by monitoring application logs for unexpected Go runtime panics.
References
Read the full report for CVE-2026-40097 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)