Skip to main content

CVE-2022-29182: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in gocd gocd

Medium
Published: Fri May 20 2022 (05/20/2022, 19:05:12 UTC)
Source: CVE
Vendor/Project: gocd
Product: gocd

Description

GoCD is a continuous delivery server. GoCD versions 19.11.0 through 21.4.0 (inclusive) are vulnerable to a Document Object Model (DOM)-based cross-site scripting attack via a pipeline run's Stage Details > Graphs tab. It is possible for a malicious script on a attacker-hosted site to execute script that will run within the user's browser context and GoCD session via abuse of a messaging channel used for communication between with the parent page and the stage details graph's iframe. This could allow an attacker to steal a GoCD user's session cookies and/or execute malicious code in the user's context. This issue is fixed in GoCD 22.1.0. There are currently no known workarounds.

AI-Powered Analysis

AILast updated: 06/23/2025, 08:35:35 UTC

Technical Analysis

CVE-2022-29182 is a DOM-based Cross-Site Scripting (XSS) vulnerability affecting GoCD, a continuous delivery server widely used for automating software deployment pipelines. The vulnerability exists in GoCD versions 19.11.0 through 21.4.0 inclusive. Specifically, the issue arises in the Stage Details > Graphs tab of a pipeline run, where improper neutralization of input allows malicious scripts to be injected and executed within the context of a user's browser session. The attack vector involves abuse of a messaging channel used for communication between the parent page and an iframe displaying the stage details graph. An attacker hosting a malicious website can trick a GoCD user into visiting their site, which then exploits this messaging channel to execute arbitrary JavaScript in the user's browser. This can lead to theft of session cookies, enabling session hijacking, or execution of other malicious code with the privileges of the authenticated GoCD user. The vulnerability is classified under CWE-79, indicating improper input sanitization during web page generation. The flaw was fixed in GoCD version 22.1.0, and no known workarounds exist for vulnerable versions. There are currently no reports of active exploitation in the wild. The vulnerability requires the victim to interact with a malicious site, but no authentication bypass is involved beyond the victim being logged into GoCD. The impact is limited to users who access the vulnerable interface and interact with the malicious content, but the consequences can be severe if session tokens or credentials are compromised, potentially allowing attackers to manipulate CI/CD pipelines or access sensitive build and deployment data.

Potential Impact

For European organizations, this vulnerability poses a significant risk to the integrity and confidentiality of their software delivery processes. GoCD is used by enterprises to automate and manage complex deployment pipelines, often involving sensitive intellectual property and production infrastructure. Successful exploitation could allow attackers to hijack user sessions, leading to unauthorized access to pipeline configurations, source code repositories, or deployment environments. This could result in unauthorized code changes, insertion of malicious code into production builds, or disruption of delivery workflows. The attack requires user interaction with a malicious site, but given the prevalence of phishing and social engineering, the risk remains tangible. Organizations in sectors with stringent compliance requirements, such as finance, healthcare, and critical infrastructure, could face regulatory and reputational damage if their CI/CD systems are compromised. Additionally, the lack of known workarounds means vulnerable instances remain exposed until upgraded, increasing the window of risk. The medium severity rating reflects the attack complexity and scope, but the potential downstream impact on software supply chain security elevates the threat's importance for European enterprises relying on GoCD.

Mitigation Recommendations

1. Immediate upgrade to GoCD version 22.1.0 or later is the most effective mitigation to eliminate the vulnerability. 2. Restrict access to the GoCD web interface using network segmentation and firewall rules to limit exposure to trusted users and networks only. 3. Implement strict Content Security Policy (CSP) headers on the GoCD server to reduce the risk of executing unauthorized scripts. 4. Educate users about phishing and social engineering risks to reduce the likelihood of visiting attacker-controlled sites. 5. Monitor GoCD logs and user activity for unusual behavior that could indicate exploitation attempts. 6. Where possible, enforce multi-factor authentication (MFA) on GoCD user accounts to reduce the impact of stolen session cookies. 7. Consider deploying web application firewalls (WAFs) with custom rules to detect and block suspicious messaging channel abuse patterns. 8. Regularly audit and review pipeline configurations and access controls to detect unauthorized changes promptly. These steps go beyond generic advice by focusing on layered defenses tailored to the nature of this DOM-based XSS and the operational context of GoCD.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-04-13T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9843c4522896dcbf2f67

Added to database: 5/21/2025, 9:09:23 AM

Last enriched: 6/23/2025, 8:35:35 AM

Last updated: 7/21/2025, 7:27:17 AM

Views: 10

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

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

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats