Vous êtes victime d’un incident de sécurité ? Contactez notre CERT

18/12/2025

Blog technique

[CVE-2025-66406] ARBITRARY SSH CERTIFICATE REVOCATION ON STEP-CA

Gabriel DEPARTOUT & Andy RUSSON

Recently, our team performed a security audit of SmallStep Certificates PKI. This audit was focused on the cryptographic aspects of the PKI, mainly the keys and certificates management and storage, certificates transfer, API security and code review. This audit was aimed at evaluating the cryptographic level and robustness of the solution.

This security audit was funded by the French cybersecurity agency (ANSSI) as part of its efforts to support the security assessment of open source software (more info here).

During this pentest, we identified one vulnerability, allowing a user to revoke any ssh certificate issued by the PKI. This vulnerability was responsibly disclosed to SmallStep, which fixed it quickly : https://github.com/smallstep/certificates/security/advisories/GHSA-j7c9-79×7-8hpr.

The CVE ID CVE-2025-66406 was assigned to it.

Exploit scenario

Any user possessing an SSH certificate signed by the PKI Step CA can revoke arbitrarily any existing SSH certificate issued by the PKI Step CA by simply authentifying himself with a valid sshpop JWT (that he can provide) and modifying the target serial number in the revocation request.

Attack path

The attacker has to forge a valid JWT containing his SSH legitimate certificate and then sign the JWT with the private key of its SSH certificate.

Then, he can use this token to authenticate himself on the Step CA PKI in order to revoke his SSH certificate. The attacker has to intercept and modify the revocation request and replace his certificate serial number by the target certificate serial number he wants to revoke.

Proof of concept

Create two SSH certificates with Step CA, one for the attacker and one for the victim:

				
					step ssh certificate attack.cert ssh_attack_key
step ssh certificate victim.cert ssh_victim_key

				
			

Get the serial number of the victim certificate:

				
					step ssh inspect ssh_victim_key-cert.pub
[…]
Serial: 9270442165428020971
[…]
				
			

Make a revocation request using sshpop JWT authentication for the attacker certificate:

				
					step ssh revoke --sshpop-cert ssh_attack_key-cert.pub --sshpop-key ssh_attack_key
				
			

Set up Burp proxy to intercept the request and replace the value serial by the target victim serial number:

Step CA PKI accepts the request. Once done, one can notice that the certificate associated with the target serial number in the revocation request is now revoked, but not the attacker SSH certificate.

Source code

Indeed, our team also checked in the source code: it does not check if the serial number in the sshpop payload is the same than the one provided in the value serial.

In the file api/revoke.go, a consistency check exists during the revocation of a X.509 certificate inside the Revoke() function that is called upon reception of the HTTP request. However, there is no such consistency check in the case of an SSH certificate in the file api/sshRevoke.go in the function SSHRevoke() that manages the HTTP request for SSH revocation.

If you want to find out more about the security audit or evaluation capabilities of our SEAL, feel free to reach us.

If you would like more information about ANSSI’s efforts to support open‑source security, please send an email to [email protected].

Voir les derniers articles de notre Blog technique

22 octobre 2025
Find here the crypto and reverse challenges that our teams created for the European Cyber Week pre-qualification and qualification tests […]
22 juillet 2025
M&NTIS Platform est une solution SaaS destinée au test d'efficacité de produits de défense et d'architectures de supervision. Une nouvelle […]
16 juillet 2025
Découvrez cette synthèse est réalisée par nos experts du SEAL, à partir des recommandations du NIST et de l’ANSSI.
24 juin 2025
Un premier billet a traité en détails l’échange de clé. Ce nouveau billet a pour sujet le reste de la […]
13 juin 2025
Recently, our Security Evaluation and Analysis Laboratory had the opportunity to perform an internal security audit of Apereo CAS, focusing […]
11 avril 2025
Le protocole TLS garantit la confidentialité et l’intégrité des échanges entre un client et un serveur et à minima l’authenticité […]
11 mars 2025
In the previous article, we explained how to find a Local Privilege Escalation using DLL sideloading. At the end, we […]
28 janvier 2025
[...] As part of this activity, we developed a tool being able to realize RFID relay attacks on access control […]
9 janvier 2025
Contrairement à une évaluation de sécurité réalisée dans un objectif de certification (CSPN ou Critères Communs), la recherche de vulnérabilités […]
20 décembre 2024
La sécurité informatique peut paraître, pour beaucoup, comme un centre de coût et de complexité : plan d’audits à mettre en […]