Vulnerabilities in pkg:golang/github.com/cloudflare/gokey

PACKAGE
Advisory Identifier: GHSA-69jw-4jj8-fcxm
Advisory Summary

CVE-2025-13353 is a HIGH gokey allows secret recovery from vulnerability (CWE-330: Use of Insufficiently Random Values) affecting Github.com/cloudflare/gokey libraries in the Go ecosystem. The issue involves gokey allows secret recovery from a seed file without the master password. Remediation is available by upgrading affected packages to version 0.2.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/cloudflare/gokey

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/cloudflare/gokey. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-69jw-4jj8-fcxm CVE-2025-13353 HIGH gokey allows secret recovery from a seed file without the master password

CVE-2025-13353 at a Glance

CVE Identifier CVE-2025-13353
GHSA Identifier GHSA-69jw-4jj8-fcxm
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-330: Use of Insufficiently Random Values
Affected Product Github.com/cloudflare/gokey
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-13353

To remediate this vulnerability, upgrade all affected Github.com/cloudflare/gokey dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/cloudflare/gokey fixed: 0.2.0
Upgrade github.com/cloudflare/gokey to 0.2.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/cloudflare/gokey

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-13353, inspect your project dependencies for Github.com/cloudflare/gokey:

inspect dependencies for github.com/cloudflare/gokey

Analyze the terminal output to locate any version of Github.com/cloudflare/gokey in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-330: Use of Insufficiently Random Values, where the product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. In Github.com/cloudflare/gokey, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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?type=user)) and responsibly disclosed through Cloudflare's bug bounty program.

CVE-2025-13353 Affected Github.com/cloudflare/gokey Versions

1 component(s)
Fixed Versions:
0.2.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/cloudflare/gokey
Go
< 0.2.0
0.2.0

References

Frequently Asked Questions

What is CVE-2025-13353?
CVE-2025-13353 is a security vulnerability in Github.com/cloudflare/gokey involving gokey allows secret recovery from a seed file without the master password under CWE-330: Use of Insufficiently Random Values.
Which Github.com/cloudflare/gokey versions are affected?
Affected versions include releases prior to 0.2.0 across affected packages: github.com/cloudflare/gokey.
What version fixes CVE-2025-13353?
Upgrading to 0.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/cloudflare/gokey affected?
Yes, github.com/cloudflare/gokey is affected in releases prior to 0.2.0. Upgrade your dependency to 0.2.0 or later.
What CWE is associated with CVE-2025-13353?
CVE-2025-13353 is classified under CWE-330: Use of Insufficiently Random Values (The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.).
How can I check Go dependencies for CVE-2025-13353?
Run the dependency tree command: 'inspect dependencies for github.com/cloudflare/gokey'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-69jw-4jj8-fcxm",
  "modified" : "2025-12-02T17:55:54Z",
  "published" : "2025-12-02T17:55:54Z",
  "aliases" : [ "CVE-2025-13353" ],
  "summary" : "gokey allows secret recovery from a seed file without the master password",
  "details" : "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.\n\nThis 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.\n\n### Impact\n\nThis 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:\n\n* 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  \n* 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\n\n### Patches\n\nThe 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.\n\n### System secret rotation guidance\n\nIt 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.\n\n#### Systems that do not require the old password/secret for rotation\n\nSuch 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.\n\n#### Systems that require the old password/secret for rotation\n\nSuch 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:\n\n* 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  \n* use gokey version `0.2.0` or above to generate the new password  \n* populate the system provided password rotation form\n\n#### Systems that allow multiple credentials for the same account to be provisioned\n\nSuch 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:\n\n* generate a new secret/key/credential using gokey version `0.2.0` or above  \n* provision the new secret/key/credential in addition to the existing credential on the system  \n* verify that the access or required system operation is still possible with the new secret/key/credential  \n* revoke authorization for the existing/old credential from the system\n\n### Credit\n\nThis vulnerability was found by Théo Cusnir ([@mister_mime](https://hackerone.com/mister_mime?type=user)) and responsibly disclosed through Cloudflare's bug bounty program.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/cloudflare/gokey"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/gokey/security/advisories/GHSA-69jw-4jj8-fcxm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-13353"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cloudflare/gokey/commit/f261819e99ea169843bd5aa3e643d046260ff511"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cloudflare/gokey"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-330" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-02T17:55:54Z",
    "nvd_published_at" : "2025-12-02T11:15:47Z"
  }
}