Vulnerabilities in pkg:golang/github.com/docker/buildx

PACKAGE
Advisory Identifier: GHSA-m4gq-fm9h-8q75
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/docker/buildx

1 Known Advisory Record(s)

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

CVE Identifier CVE-2025-0495
GHSA Identifier GHSA-m4gq-fm9h-8q75
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Github.com/docker/buildx
Package Ecosystem Go
Published Date
Last Updated

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.

github.com/docker/buildx fixed: 0.21.3
Upgrade github.com/docker/buildx to 0.21.3
Verify Direct and Transitive Dependencies

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

### Impact Some 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. If 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. ### Patches Issue has been fixed in Buildx v0.21.3 or newer. ### Workarounds Avoid passing cache backend credentials with CLI arguments. Make sure access to traces and BuildKit history records is kept secure.

CVE-2025-0495 Affected Github.com/docker/buildx Versions

1 component(s)
Fixed Versions:
0.21.3
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?
CVE-2025-0495 is a security vulnerability in Github.com/docker/buildx involving buildx allows a possible credential leakage to telemetry endpoint under CWE-532: Insertion of Sensitive Information into Log File.
Which Github.com/docker/buildx versions are affected?
Affected versions include releases prior to 0.21.3 across affected packages: github.com/docker/buildx.
What version fixes CVE-2025-0495?
Upgrading to 0.21.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/docker/buildx affected?
Yes, github.com/docker/buildx is affected in releases prior to 0.21.3. Upgrade your dependency to 0.21.3 or later.
What CWE is associated with CVE-2025-0495?
CVE-2025-0495 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check Go dependencies for CVE-2025-0495?
Run the dependency tree command: 'inspect dependencies for github.com/docker/buildx'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}