You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
certificate path: found duplicate certificates (AndroidKey #705
I have an issue as follows:
I'm currently using SimpleWebAuthn version 11.
Back in January 2025, I used a Samsung S9+ running Android 10 to successfully create a passkey on my website.
However, today I'm using the same device to create a new passkey for a different account on the same website, but I'm now getting the following error:
certificate path: found duplicate certificates (AndroidKey)
I have tried debugging but haven't found the root cause yet.
During this time, I only updated the AAGUID values according to the library but did not change any of my code.
Hello @transon12, please share some sample code of how you're using SimpleWebAuthn, including the WebAuthn response you're trying to verify that's causing this error.
try{// Confirm where the generated keyconstfullUrl=event?.headers?.origin||process.env.WF_DOMAINconstparsedUrl=newURL(fullUrl)consthostname=parsedUrl.hostnameconstverification=awaitverifyRegistrationResponse({response: passkey,expectedChallenge: currentChallenge.activation_key,expectedOrigin: fullUrl,expectedRPID: hostname,requireUserVerification: false,})returnutility.createResponse(true)}catch(error){console.log(error)returnutility.createResponseAndLog(event,error,null,[errorMessageCodeConstant.SYSTEM_ERROR])}
At the moment, I'm processing it this way, and the error is being thrown and caught in the catch block.
Error message content:
{"message":"Invalid certificate path: found duplicate certificates (AndroidKey)","data":{}} @MasterKale
I'll need the value of passkey to get anywhere with this one as it's the response out of the WebAuthn API call that contains the attestation statement that ends up with duplicated certificates.
@transon12 I've been taking a look at this issue, and there's something odd about the response your S9+ is generating. The signature of the intermediate certificate in the attestation statement fails to verify because it doesn't appear to be the proper length. The signature decodes to an r and s both of length 48 bytes, which typically indicates use of SHA384 in generating this signature. However the signature algorithm specified in that cert is SHA256, so signature verification can't be completed.
Given the release date of the S9+ as ~2018, and the fact that it's running Android 10, I'm not sure I'm going to dig into this much more. This project has working Android Key attestation verification in this library that can verify responses from other devices. But if the device produces an attestation that's not correctly signed there's not really anything I can do in this library to fix that.
I'm reopening this issue because I couldn't let this go and dug back in. I think this might actually highlight a subtle issue with X.509 validation. I'm going to keep at this for a bit longer...
@transon12 Apologies for the delay. Your issue did indeed surface an opportunity to improve attestation verification. I've completed the work in #721, but it's not yet been released for one more bit of work I want to complete first before releasing a new version of @simplewebauthn/server that should finally fix your problem.
Activity
MasterKale commentedon Jul 15, 2025
Hello @transon12, please share some sample code of how you're using SimpleWebAuthn, including the WebAuthn response you're trying to verify that's causing this error.
transon12 commentedon Jul 15, 2025
At the moment, I'm processing it this way, and the error is being thrown and caught in the catch block.
Error message content:
{"message":"Invalid certificate path: found duplicate certificates (AndroidKey)","data":{}}
@MasterKale
MasterKale commentedon Jul 15, 2025
I'll need the value of
passkeyto get anywhere with this one as it's the response out of the WebAuthn API call that contains the attestation statement that ends up with duplicated certificates.transon12 commentedon Jul 16, 2025
dear @MasterKale
passkey value
"passkey": { "id": "AZNJEB2RcdcMJ0kZ1X1lyA6d7ENiKF5K945bpbZXxdVqoyjENSnHSZuxZz9sBMVyKAArpVBhwWr7WTutT_epNsk", "rawId": "AZNJEB2RcdcMJ0kZ1X1lyA6d7ENiKF5K945bpbZXxdVqoyjENSnHSZuxZz9sBMVyKAArpVBhwWr7WTutT_epNsk", "response": { "attestationObject": "o2NmbXRrYW5kcm9pZC1rZXlnYXR0U3RtdKNjYWxnJmNzaWdYRzBFAiBN6uMvi4Arrog6bM-EH_HHdcYowZb9AZ3OP8LF7BsOwQIhAIGMW51yybiu_p90i60qFilQ2NTBfNSKMxWSd-_ElLGGY3g1Y4RZAsAwggK8MIICYqADAgECAgEBMAoGCCqGSM49BAMCMCkxGTAXBgNVBAUTEDljZmFiZjY5ZWNjMzc0OWMxDDAKBgNVBAwMA1RFRTAgFw03MDAxMDEwMDAwMDBaGA8yMTA2MDIwNzA2MjgxNVowHzEdMBsGA1UEAwwUQW5kcm9pZCBLZXlzdG9yZSBLZXkwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARF-xUruvQrCRWHiRDV4Lsq4FjoEpLFf361IEQaaeBsGuz0zt29H0BKNbEIUpvWcuKBKwmcOvMH2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R25Rw", "authenticatorData": "T848GIB1YSy2AgqgP_bEoHGe74fBQecLAfr8oYF8zI5FAAAAALk_2WHy5kYvsSKCACJH3ngAQQGTSRAdkXHXDCdJGdV9ZcgOnexDYiheSveOW6W2V8XVaqMoxDUpx0mbsWc_bATFcigAK6VQYcFq-1k7rU_3qTbJpQECAyYgASFYIEX7FSu69CsJFYeJENXguyrgWOgSksV_frUgRBpp4GwaIlgg7PTO3b0fQEo1sQhSm9Zy4oErCZw68wfbAUBnu1EduUc" }, "type": "public-key", "clientExtensionResults": { "credProps": { "rk": false } }, "authenticatorAttachment": "platform" },MasterKale commentedon Aug 6, 2025
Thanks for the response @transon12. I'm reviewing some of these issues I've neglected and will come back to this sometime this week.
MasterKale commentedon Aug 6, 2025
Note to self: debugger link
MasterKale commentedon Aug 22, 2025
@transon12 I've been taking a look at this issue, and there's something odd about the response your S9+ is generating. The signature of the intermediate certificate in the attestation statement fails to verify because it doesn't appear to be the proper length. The signature decodes to an
randsboth of length 48 bytes, which typically indicates use of SHA384 in generating this signature. However the signature algorithm specified in that cert is SHA256, so signature verification can't be completed.Given the release date of the S9+ as ~2018, and the fact that it's running Android 10, I'm not sure I'm going to dig into this much more. This project has working Android Key attestation verification in this library that can verify responses from other devices. But if the device produces an attestation that's not correctly signed there's not really anything I can do in this library to fix that.
Closing this out for now.
transon12 commentedon Aug 22, 2025
Thank you very much for your reply.
MasterKale commentedon Aug 22, 2025
I'm reopening this issue because I couldn't let this go and dug back in. I think this might actually highlight a subtle issue with X.509 validation. I'm going to keep at this for a bit longer...
MasterKale commentedon Sep 14, 2025
@transon12 Apologies for the delay. Your issue did indeed surface an opportunity to improve attestation verification. I've completed the work in #721, but it's not yet been released for one more bit of work I want to complete first before releasing a new version of @simplewebauthn/server that should finally fix your problem.
Thank you for your patience 🙇
MasterKale commentedon Sep 15, 2025
@transon12 This issue now should be fixed in @simplewebauthn/server@13.2.0. Thank you again for your patience!