GHSA-f6mm-5fc7-3g3c json
goreleaser shows environment by default
published 2y ago modified 2mo ago also GO-2024-2860
- cvss
- 6.2
- version 3.1, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
### Summary Since #4787 the log output is printed on the INFO level, while previously it was logged on DEBUG. This means if the `go build` output is non-empty, goreleaser leaks the environment.
### PoC * Create a Go project with dependencies, do not pull them yet (or run goreleaser later in a container, or delete `$GOPATH/pkg`). * Make sure to have secrets set in the environment * Make sure to not have `go mod tidy` in a before hook * Run `goreleaser release --clean` * Go prints lots of `go: downloading ...` lines, which triggers the "if output not empty, log it" line, which includes the environment.
### Impact Credentials and tokens are leaked.
Patch / fix
- go github.com/goreleaser/goreleaser 1.26.1
- github.com/goreleaser/goreleaser@22f734e commit
- github.com/goreleaser/goreleaser#4787 pull request
Is GHSA-f6mm-5fc7-3g3c in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/goreleaser/goreleaser | >=1.26.0, <1.26.1 |
1.26.1 |
Classification
- Weakness
-
- CWE-532 Insertion of Sensitive Information into Log File
References
Sources
- GitHub Advisory GHSA-f6mm-5fc7-3g3c
- OSV GO-2024-2860
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.