CVE-2024-41121: Woodpecker's custom workspace allow to overwrite plugin entrypoint executable
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.55492%
CWE
Published
7/19/2024
Updated
8/7/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched 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 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper workspace path handling. Key functions identified: 1) createProcess in convert.go - originally used user-defined workspace base for plugins, allowing overwriting of entrypoint executables via path traversal. 2) stepWorkingDir - combined user-controlled paths without plugin-specific sanitization. 3) WithWorkspace in option.go - set vulnerable path values. The patch introduced path.Clean, enforced fixed pluginWorkspaceBase, and separated plugin/non-plugin path handling, confirming these were the vulnerable points.