GHSA-f6mm-5fc7-3g3c: Github.com/goreleaser/goreleaser Goreleaser Shows Environment By Default Vulnerability
MODERATEGHSA-f6mm-5fc7-3g3c is a MODERATE (CVSS 6.2) goreleaser shows environment by default vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Github.com/goreleaser/goreleaser libraries in the Go ecosystem. The issue involves goreleaser shows environment by default. Remediation is available by upgrading affected packages to version 1.26.1.
GHSA-f6mm-5fc7-3g3c at a Glance
Security Impact
CVSS: 6.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-f6mm-5fc7-3g3c
To remediate this vulnerability, upgrade all affected Github.com/goreleaser/goreleaser 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 github.com/goreleaser/goreleaser to 1.26.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/goreleaser/goreleaser
How to Check if You Are Affected
To determine whether your application is affected by GHSA-f6mm-5fc7-3g3c, inspect your project dependencies for Github.com/goreleaser/goreleaser:
inspect dependencies for github.com/goreleaser/goreleaser
Analyze the terminal output to locate any version of Github.com/goreleaser/goreleaser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.26.1), 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-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Github.com/goreleaser/goreleaser, 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
GHSA-f6mm-5fc7-3g3c Affected Github.com/goreleaser/goreleaser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/goreleaser/goreleaser
|
Go |
≥ 1.26.0
< 1.26.1
All 1 versions
1.26.0
|
1.26.1
|
References
Frequently Asked Questions
What is GHSA-f6mm-5fc7-3g3c?
Which Github.com/goreleaser/goreleaser versions are affected?
What version fixes GHSA-f6mm-5fc7-3g3c?
Is github.com/goreleaser/goreleaser affected?
What is the CVSS score of GHSA-f6mm-5fc7-3g3c?
What CWE is associated with GHSA-f6mm-5fc7-3g3c?
How can I check Go dependencies for GHSA-f6mm-5fc7-3g3c?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f6mm-5fc7-3g3c",
"modified" : "2024-05-15T17:17:10Z",
"published" : "2024-05-15T17:17:10Z",
"aliases" : [ ],
"summary" : "goreleaser shows environment by default",
"details" : "### Summary\nSince #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.\n\n### PoC\n* Create a Go project with dependencies, do not pull them yet (or run goreleaser later in a container, or delete `$GOPATH/pkg`).\n* Make sure to have secrets set in the environment\n* Make sure to not have `go mod tidy` in a before hook\n* Run `goreleaser release --clean`\n* Go prints lots of `go: downloading ...` lines, which triggers the \"if output not empty, log it\" line, which includes the environment.\n\n### Impact\nCredentials and tokens are leaked.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goreleaser/goreleaser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.26.0"
}, {
"fixed" : "1.26.1"
} ]
} ],
"versions" : [ "1.26.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goreleaser/goreleaser/security/advisories/GHSA-f6mm-5fc7-3g3c"
}, {
"type" : "WEB",
"url" : "https://github.com/goreleaser/goreleaser/pull/4787"
}, {
"type" : "WEB",
"url" : "https://github.com/goreleaser/goreleaser/commit/22f734e41f7a5111a031a3a4eb714c1b6aa6456b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goreleaser/goreleaser"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-15T17:17:10Z",
"nvd_published_at" : null
}
}