CVE-2024-56321 GoCD can allow malicious GoCD admins to abuse backup configuration to gain additional host access

Low 3.8 Published Updated

Malicious GoCD admins can abuse backup configuration to execute arbitrary scripts on the host, potentially escalating privileges in restricted environments.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-56321?

CVE-2024-56321 is a low-severity command injection vulnerability in gocd, published on 3 Jan 2025. An attacker needs administrator access to exploit it, with no action from the victim.

Official description

GoCD is a continuous deliver server. GoCD versions 18.9.0 through 24.4.0 (inclusive) can allow GoCD admins to abuse the backup configuration "post-backup script" feature to potentially execute arbitrary scripts on the hosting server or container as GoCD's user, rather than pre-configured scripts. In practice the impact of this vulnerability is limited, as in most configurations a user who can log into the GoCD UI as an admin also has host administration permissions for the host/container that GoCD runs on, in order to manage artifact storage and other service-level configuration options. Additionally, since a GoCD admin has ability to configure and schedule pipelines tasks on all GoCD agents available to the server, the fundamental functionality of GoCD allows co-ordinated task execution similar to that of post-backup-scripts. However in restricted environments where the host administration is separated from the role of a GoCD admin, this may be unexpected. The issue is fixed in GoCD 24.5.0. Post-backup scripts can no longer be executed from within certain sensitive locations on the GoCD server. No known workarounds are available.

Weakness: CWE-36, CWE-20

Which versions are affected by CVE-2024-56321?

It affects 1 product.

Products include Thoughtworks Gocd.

How do I fix CVE-2024-56321?

No fix has been published for CVE-2024-56321 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2024-56321 being exploited?

There is no known exploitation of CVE-2024-56321 in the wild and no public exploit code.

Sources

Also known as GHSA-7jr3-gh3w-vjxq.

Is CVE-2024-56321 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free