CVE-2025-13353: gokey allows secret recovery from a seed file without the master password

Published Dec 2, 2025
·
Updated

In gokey versions <0.2.0, a flaw in the seed decryption logic resulted in passwords incorrectly being derived solely from the initial vector and the AES-GCM authentication tag of the key seed.

This issue has been fixed in gokey version 0.2.0. This is a breaking change. The fix has invalidated any passwords/secrets that were derived from the seed file (using the -s option). Even if the input seed file stays the same, version 0.2.0 gokey will generate different secrets.

Impact

This vulnerability impacts generated keys/secrets using a seed file as an entropy input (using the -s option). Keys/secrets generated just from the master password (without the -s option) are not impacted. The confidentiality of the seed itself is also not impacted (it is not required to regenerate the seed itself). Specific impact includes:

keys/secrets generated from a seed file may have lower entropy: it was expected that the whole seed would be used to generate keys (240 bytes of entropy input), where in vulnerable versions only 28 bytes was used a malicious entity could have recovered all passwords, generated from a particular seed, having only the seed file in possession without the knowledge of the seed master password

Patches

The code logic bug has been fixed in gokey version 0.2.0 and above. Due to the deterministic nature of gokey, fixed versions will produce different passwords/secrets using seed files, as all seed entropy will be used now.

System secret rotation guidance

It is advised for users to regenerate passwords/secrets using the patched version of gokey (0.2.0 and above), and provision/rotate these secrets into respective systems in place of the old secret. A specific rotation procedure is system-dependent, but most common patterns are described below.

Systems that do not require the old password/secret for rotation

Such systems usually have a "Forgot password" facility or a similar facility allowing users to rotate their password/secrets by sending a unique "magic" link to the user's email or phone. In such cases users are advised to use this facility and input the newly generated password secret, when prompted by the system.

Systems that require the old password/secret for rotation

Such systems usually have a modal password rotation window usually in the user settings section requiring the user to input the old and the new password sometimes with a confirmation. To generate/recover the old password in such cases users are advised to:

temporarily download gokey version 0.1.3 for their respective operating system to recover the old password use gokey version 0.2.0 or above to generate the new password populate the system provided password rotation form

Systems that allow multiple credentials for the same account to be provisioned

Such systems usually require a secret or a cryptographic key as a credential for access, but allow several credentials at the same time. One example is SSH: a particular user may have several authorized public keys configured on the SSH server for access. For such systems users are advised to:

generate a new secret/key/credential using gokey version 0.2.0 or above provision the new secret/key/credential in addition to the existing credential on the system verify that the access or required system operation is still possible with the new secret/key/credential revoke authorization for the existing/old credential from the system

Credit

This vulnerability was found by Théo Cusnir (@mistermime) and responsibly disclosed through Cloudflare's bug bounty program.

Other sources

In gokey versions <0.2.0, a flaw in the seed decryption logic resulted in passwords incorrectly being derived solely from the initial vector and the AES-GCM authentication tag of the key seed.

This issue has been fixed in gokey version 0.2.0. This is a breaking change. The fix has invalidated any passwords/secrets that were derived from the seed file (using the -s option). Even if the input seed file stays the same, version 0.2.0 gokey will generate different secrets.

Impact This vulnerability impacts generated keys/secrets using a seed file as an entropy input (using the -s option). Keys/secrets generated just from the master password (without the -s option) are not impacted. The confidentiality of the seed itself is also not impacted (it is not required to regenerate the seed itself). Specific impact includes:

keys/secrets generated from a seed file may have lower entropy: it was expected that the whole seed would be used to generate keys (240 bytes of entropy input), where in vulnerable versions only 28 bytes was used

a malicious entity could have recovered all passwords, generated from a particular seed, having only the seed file in possession without the knowledge of the seed master password

Patches The code logic bug has been fixed in gokey version 0.2.0 and above. Due to the deterministic nature of gokey, fixed versions will produce different passwords/secrets using seed files, as all seed entropy will be used now.

System secret rotation guidance It is advised for users to regenerate passwords/secrets using the patched version of gokey (0.2.0 and above), and provision/rotate these secrets into respective systems in place of the old secret. A specific rotation procedure is system-dependent, but most common patterns are described below.

Systems that do not require the old password/secret for rotation Such systems usually have a "Forgot password" facility or a similar facility allowing users to rotate their password/secrets by sending a unique "magic" link to the user's email or phone. In such cases users are advised to use this facility and input the newly generated password secret, when prompted by the system.

Systems that require the old password/secret for rotation Such systems usually have a modal password rotation window usually in the user settings section requiring the user to input the old and the new password sometimes with a confirmation. To generate/recover the old password in such cases users are advised to:

temporarily download gokey version 0.1.3 https://github.com/cloudflare/gokey/releases/tag/v0.1.3 for their respective operating system to recover the old password

use gokey version 0.2.0 or above to generate the new password

populate the system provided password rotation form

Systems that allow multiple credentials for the same account to be provisioned Such systems usually require a secret or a cryptographic key as a credential for access, but allow several credentials at the same time. One example is SSH: a particular user may have several authorized public keys configured on the SSH server for access. For such systems users are advised to:

generate a new secret/key/credential using gokey version 0.2.0 or above

provision the new secret/key/credential in addition to the existing credential on the system

verify that the access or required system operation is still possible with the new secret/key/credential

revoke authorization for the existing/old credential from the system

Credit This vulnerability was found by Théo Cusnir ( @mistermime https://hackerone.com/mistermime ) and responsibly disclosed through Cloudflare's bug bounty program.

MITRE

Affected Software

3 affected componentsFixes available
gokey gokey<0.2.0
go/github.com/cloudflare/gokey<0.2.0
0.2.0
Cloudflare Gokey Go<0.2.0

Event History

Dec 2, 2025
CVE Published
via MITRE·11:03 AM
Data Sourced
via MITRE·11:03 AM
DescriptionWeakness
Data Sourced
via NVD·11:15 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:15 AM
Affected Software
Advisory Published
via GitHub·05:55 PM
Data Sourced
via GitHub·05:55 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-13353?

CVE-2025-13353 is considered a critical vulnerability due to the flawed seed decryption logic affecting password security.

2

How do I fix CVE-2025-13353?

To fix CVE-2025-13353, upgrade to gokey version 0.2.0 or later.

3

What is the risk of not addressing CVE-2025-13353?

Failure to address CVE-2025-13353 could lead to unauthorized access as passwords may be incorrectly derived.

4

Which versions of gokey are affected by CVE-2025-13353?

CVE-2025-13353 affects all versions of gokey prior to 0.2.0.

5

Is the fix for CVE-2025-13353 backward compatible?

No, the fix for CVE-2025-13353 in version 0.2.0 introduces breaking changes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203