Vulnerabilities in pkg:golang/github.com/docker/buildx
PACKAGECVE-2025-0495 is a MODERATE buildx allows a possible credential vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Github.com/docker/buildx libraries in the Go ecosystem. The issue involves buildx allows a possible credential leakage to telemetry endpoint. Remediation is available by upgrading affected packages to version 0.21.3.
pkg:golang/github.com/docker/buildx
Vulnerability advisories affecting package pkg:golang/github.com/docker/buildx. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-m4gq-fm9h-8q75 | CVE-2025-0495 | MODERATE | buildx allows a possible credential leakage to telemetry endpoint |
CVE-2025-0495 at a Glance
How to Fix CVE-2025-0495
To remediate this vulnerability, upgrade all affected Github.com/docker/buildx 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/docker/buildx to 0.21.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/docker/buildx
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-0495, inspect your project dependencies for Github.com/docker/buildx:
inspect dependencies for github.com/docker/buildx
Analyze the terminal output to locate any version of Github.com/docker/buildx in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.21.3), 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/docker/buildx, 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-2025-0495 Affected Github.com/docker/buildx Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/docker/buildx
|
Go |
< 0.21.3
|
0.21.3
|
References
Frequently Asked Questions
What is CVE-2025-0495?
Which Github.com/docker/buildx versions are affected?
What version fixes CVE-2025-0495?
Is github.com/docker/buildx affected?
What CWE is associated with CVE-2025-0495?
How can I check Go dependencies for CVE-2025-0495?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m4gq-fm9h-8q75",
"modified" : "2025-03-17T21:51:49Z",
"published" : "2025-03-17T21:27:43Z",
"aliases" : [ "CVE-2025-0495" ],
"summary" : "buildx allows a possible credential leakage to telemetry endpoint",
"details" : "### Impact\nSome cache backends allow configuring their credentials by setting secrets directly as attribute values in `cache-to/cache-from` configuration. If this was done by the user, these secure values could be captured together with OpenTelemetry trace as part of the arguments and flags for the traced CLI command. Passing tokens to Github cache backend via environment variables or using registry authentication is not affected.\n\nIf you passed a token value like this and use a custom OpenTelemetry collector for computing traces you should make sure that your traces are kept secure. OpenTelemetry traces are also saved in BuildKit daemon's history records.\n\n### Patches\nIssue has been fixed in Buildx v0.21.3 or newer.\n\n### Workarounds\nAvoid passing cache backend credentials with CLI arguments. Make sure access to traces and BuildKit history records is kept secure.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:L/VI:N/VA:N/SC:H/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/docker/buildx"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.21.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.21.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/docker/buildx/security/advisories/GHSA-m4gq-fm9h-8q75"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-0495"
}, {
"type" : "WEB",
"url" : "https://github.com/docker/buildx/commit/18ccba072076ddbfb0aeedd6746d7719b0729b58"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/docker/buildx"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-17T21:27:43Z",
"nvd_published_at" : "2025-03-17T20:15:13Z"
}
}