CVE-2024-41121: Go.woodpecker ci.org/woodpecker/v2 Woodpecker's Custom Workspace Allow To Vulnerability
HIGHCVE-2024-41121 is a HIGH (CVSS 8.8) woodpecker's custom workspace allow to vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Go.woodpecker ci.org/woodpecker/v2 libraries in the Go ecosystem. The issue involves woodpecker's custom workspace allow to overwrite plugin entrypoint executable. Remediation is available by upgrading affected packages to version 2.7.0.
CVE-2024-41121 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2024-41121
To remediate this vulnerability, upgrade all affected Go.woodpecker ci.org/woodpecker/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade go.woodpecker-ci.org/woodpecker/v2 to 2.7.0
Upgrade go.woodpecker-ci.org/woodpecker to 2.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for go.woodpecker-ci.org/woodpecker/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-41121, inspect your project dependencies for Go.woodpecker ci.org/woodpecker/v2:
inspect dependencies for go.woodpecker-ci.org/woodpecker/v2
Analyze the terminal output to locate any version of Go.woodpecker ci.org/woodpecker/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Go.woodpecker ci.org/woodpecker/v2, 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
CVE-2024-41121 Affected Go.woodpecker ci.org/woodpecker/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
go.woodpecker-ci.org/woodpecker/v2
|
Go |
< 2.7.0
|
2.7.0
|
|
go.woodpecker-ci.org/woodpecker
|
Go |
< 2.7.0
|
2.7.0
|
References
Frequently Asked Questions
What is CVE-2024-41121?
Which Go.woodpecker ci.org/woodpecker/v2 versions are affected?
What version fixes CVE-2024-41121?
Is go.woodpecker-ci.org/woodpecker/v2 affected?
Is go.woodpecker-ci.org/woodpecker affected?
What is the CVSS score of CVE-2024-41121?
What CWE is associated with CVE-2024-41121?
How can I check Go dependencies for CVE-2024-41121?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xw35-rrcp-g7xm",
"modified" : "2024-08-07T14:19:47Z",
"published" : "2024-07-19T19:59:08Z",
"aliases" : [ "CVE-2024-41121" ],
"summary" : "Woodpecker's custom workspace allow to overwrite plugin entrypoint executable",
"details" : "### Impact\nThe server allow to create any user who can trigger a pipeline run malicious workflows:\n- Those workflows can either lead to a host takeover that runs the agent executing the workflow.\n- Or allow to extract the secrets who would be normally provided to the plugins who's entrypoint are overwritten.\n\n### Patches\nhttps://github.com/woodpecker-ci/woodpecker/pull/3933\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n**Enable the \"gated\" repo feature and review each change upfront**\n\n### References\n- https://github.com/woodpecker-ci/woodpecker/pull/3933\n- https://github.com/woodpecker-ci/woodpecker-security/pull/11\n- https://github.com/woodpecker-ci/woodpecker-security/issues/8 (info will be published later at https://github.com/woodpecker-ci/woodpecker/issues/3924)\n- https://github.com/woodpecker-ci/woodpecker-security/issues/9 (info will be published later at https://github.com/woodpecker-ci/woodpecker/issues/3924)\n- https://github.com/woodpecker-ci/woodpecker/issues/3924 (info will be published later once we got adoption of the update)\n\n### Credits\n\n- Daniel Kilimnik [@D_K_Dev](https://x.com/D_K_Dev) (Neodyme AG)\n- Felipe Custodio Romero [@_localo_](https://x.com/_localo_) (Neodyme AG)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "go.woodpecker-ci.org/woodpecker/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.7.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "go.woodpecker-ci.org/woodpecker"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/woodpecker-ci/woodpecker/security/advisories/GHSA-xw35-rrcp-g7xm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41121"
}, {
"type" : "WEB",
"url" : "https://github.com/woodpecker-ci/woodpecker-security/issues/8"
}, {
"type" : "WEB",
"url" : "https://github.com/woodpecker-ci/woodpecker-security/issues/9"
}, {
"type" : "WEB",
"url" : "https://github.com/woodpecker-ci/woodpecker/issues/3924"
}, {
"type" : "WEB",
"url" : "https://github.com/woodpecker-ci/woodpecker-security/pull/11"
}, {
"type" : "WEB",
"url" : "https://github.com/woodpecker-ci/woodpecker/pull/3933"
}, {
"type" : "WEB",
"url" : "https://github.com/woodpecker-ci/woodpecker/commit/764329ed1dbc47c4a517ccc749e3feb34059fac8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/woodpecker-ci/woodpecker"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2999"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-74" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-19T19:59:08Z",
"nvd_published_at" : "2024-07-19T20:15:08Z"
}
}