CVE-2024-23840: Github.com/goreleaser/goreleaser `goreleaser Release --debug` Shows Secrets Vulnerability
MODERATECVE-2024-23840 is a MODERATE (CVSS 5.5) `goreleaser release --debug` shows secrets vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Github.com/goreleaser/goreleaser libraries in the Go ecosystem. The issue involves `goreleaser release --debug` shows secrets. Remediation is available by upgrading affected packages to version 1.24.0.
CVE-2024-23840 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2024-23840
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.24.0
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 CVE-2024-23840, 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.24.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-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
CVE-2024-23840 Affected Github.com/goreleaser/goreleaser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/goreleaser/goreleaser
|
Go |
≥ 1.23.0
< 1.24.0
All 1 versions
1.23.0
|
1.24.0
|
References
Frequently Asked Questions
What is CVE-2024-23840?
Which Github.com/goreleaser/goreleaser versions are affected?
What version fixes CVE-2024-23840?
Is github.com/goreleaser/goreleaser affected?
What is the CVSS score of CVE-2024-23840?
What CWE is associated with CVE-2024-23840?
How can I check Go dependencies for CVE-2024-23840?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h3q2-8whx-c29h",
"modified" : "2024-03-04T18:45:24Z",
"published" : "2024-01-30T20:57:52Z",
"aliases" : [ "CVE-2024-23840" ],
"summary" : "`goreleaser release --debug` shows secrets",
"details" : "### Summary\nHello 👋 \n\n`goreleaser release --debug` log shows secret values used in the in the custom publisher.\n\n\nHow to reproduce the issue:\n\n- Define a custom publisher as the one below. Make sure to provide a custom script to the `cmd` field and to provide a secret to `env` \n\n```\n#.goreleaser.yml \npublishers:\n - name: my-publisher\n # IDs of the artifacts we want to sign\n ids:\n - linux_archives\n - linux_package\n cmd: \"./build/package/linux_notarize.sh\"\n env:\n - VERSION={{ .Version }}\n - SECRET_1={{.Env.SECRET_1}}\n - SECRET_2={{.Env.SECRET_2}}\n```\n\n- run `goreleaser release --debug`\n\nYou should see your secret value in the gorelease log. The log shows also the `GITHUB_TOKEN`\n\nExample:\n\n```\nrunning cmd= ....\nSECRET_1=secret_value\n```\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/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.23.0"
}, {
"fixed" : "1.24.0"
} ]
} ],
"versions" : [ "1.23.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goreleaser/goreleaser/security/advisories/GHSA-h3q2-8whx-c29h"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23840"
}, {
"type" : "WEB",
"url" : "https://github.com/goreleaser/goreleaser/commit/d5b6a533ca1dc3366983d5d31ee2d2b6232b83c0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goreleaser/goreleaser"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-01-30T20:57:52Z",
"nvd_published_at" : "2024-01-30T17:15:11Z"
}
}