CVE-2024-41122: Woodpecker's custom environment variables allow to alter execution flow of plugins
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.45937%
CWE
Published
7/19/2024
Updated
11/18/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/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 two key flaws: 1) The IsPlugin check didn't consider environment variables, allowing plugins to be configured with dangerous env vars. 2) The linter allowed environment variables in plugin steps through insufficient validation. The patches added environment checks to IsPlugin and replaced lintCommands with lintSettings that enforces mutual exclusivity between settings and environment/commands/entrypoint.