Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-13353: CWE-330 Use of Insufficiently Random Values in Cloudflare gokey

0
High
VulnerabilityCVE-2025-13353cvecve-2025-13353cwe-330
Published: Tue Dec 02 2025 (12/02/2025, 11:03:21 UTC)
Source: CVE Database V5
Vendor/Project: Cloudflare
Product: gokey

Description

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 ( @mister_mime https://hackerone.com/mister_mime ) and responsibly disclosed through Cloudflare's bug bounty program.

AI-Powered Analysis

AILast updated: 12/09/2025, 12:25:56 UTC

Technical Analysis

CVE-2025-13353 is a cryptographic vulnerability in Cloudflare's gokey utility, specifically in versions before 0.2.0. The flaw arises from a bug in the seed decryption logic where passwords and secrets derived using the '-s' option (seed file as entropy input) were generated using only 28 bytes of entropy instead of the expected 240 bytes. This insufficient randomness stems from deriving keys solely from the AES-GCM initialization vector and authentication tag of the seed, ignoring the full seed entropy. Consequently, an attacker with access to the seed file could recover all passwords generated from that seed without needing the master password, compromising confidentiality. Keys generated without the seed file (i.e., from the master password alone) remain unaffected. The vulnerability was responsibly disclosed and fixed in gokey version 0.2.0, which employs a corrected key derivation process utilizing the entire seed entropy, resulting in different secrets even from the same seed file. Due to this deterministic change, all secrets generated with vulnerable versions must be regenerated and rotated. The CVSS 4.0 vector indicates local attack vector, low attack complexity, partial privileges required, no user interaction, and high impact on confidentiality. No known exploits are currently in the wild. The vulnerability primarily affects environments where gokey is used with seed files for secret generation, such as automated credential provisioning and cryptographic key management.

Potential Impact

For European organizations, the impact of CVE-2025-13353 is significant in environments relying on gokey for generating cryptographic keys and passwords using seed files. The reduced entropy in generated secrets means that if an attacker gains access to the seed file, they can potentially recover all derived secrets without needing the master password, leading to a full compromise of credentials and sensitive systems. This undermines the confidentiality and integrity of authentication mechanisms, potentially allowing unauthorized access to critical infrastructure, internal services, or cloud environments. The deterministic nature of the fix means that all affected secrets must be rotated, which could be operationally challenging and resource-intensive. Organizations using gokey in automated pipelines or for SSH key generation may face increased risk of lateral movement or privilege escalation if old secrets remain active. The vulnerability does not affect secrets generated without seed files, limiting the scope somewhat. However, the breach of seed-based secrets could lead to cascading security failures, especially in sectors with high security requirements such as finance, government, and critical infrastructure within Europe.

Mitigation Recommendations

1. Immediately upgrade all gokey installations to version 0.2.0 or later to apply the fix that correctly uses full seed entropy in key derivation. 2. Identify all secrets and passwords generated using gokey with the '-s' seed file option and regenerate them using the patched version. 3. Implement a comprehensive secret rotation plan tailored to each system type: use 'forgot password' flows where available, or recover old secrets with gokey 0.1.3 if required for rotation. 4. For systems allowing multiple credentials (e.g., SSH), provision new keys alongside old ones, verify access, then revoke old keys to avoid downtime. 5. Secure and restrict access to seed files to prevent unauthorized possession, as possession alone enables secret recovery in vulnerable versions. 6. Audit and monitor systems for unauthorized access attempts potentially exploiting compromised secrets. 7. Educate security teams and developers on the implications of using seed files with gokey and encourage use of master-password-only generation where feasible. 8. Review and harden operational procedures around secret management to minimize exposure and improve incident response readiness.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
cloudflare
Date Reserved
2025-11-18T11:21:27.669Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 692ec9d25ae7112264b9032e

Added to database: 12/2/2025, 11:13:22 AM

Last enriched: 12/9/2025, 12:25:56 PM

Last updated: 1/16/2026, 7:32:55 PM

Views: 123

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats