CVE-2025-0495: Secrets leakage to telemetry endpoint via cache backend configuration via buildx

Published Mar 17, 2025
·
Updated

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.

Other sources

Buildx is a Docker CLI plugin that extends build capabilities using BuildKit.

Cache backends support credentials by setting secrets directly as attribute values in cache-to/cache-from configuration. When supplied as user input, these secure values may be inadvertently captured in OpenTelemetry traces as part of the arguments and flags for the traced CLI command. OpenTelemetry traces are also saved in BuildKit daemon's history records.

This vulnerability does not impact secrets passed to the Github cache backend via environment variables or registry authentication.

NVD

Secrets leakage to telemetry endpoint via cache backend configuration via buildx

Microsoft

Affected Software

4 affected componentsFixes available
Docker Buildx
go/github.com/docker/buildx<=0.21.2
0.21.3
Microsoft cbl2 moby-buildx 0.7.1-25<0.7.1-25
0.7.1-25
Microsoft azl3 docker-buildx 0.14.0-5<0.14.0-5
0.14.0-5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/docker/buildx to a version that resolves this vulnerability.

    Fixed in 0.21.3
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.7.1-25
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.14.0-5
  4. Upgrade

    Upgrade docker/buildx to a version that resolves this vulnerability.

    Fixed in 0.21.3
  5. Configuration

    Avoid passing cache backend credentials with CLI arguments; configure cache backend secrets via cache-to/cache-from configuration as attribute values (as described) to reduce the chance of token/secret values being captured in traced CLI arguments.

    Buildx cache-to/cache-from credentials handling = do not pass cache backend credentials with CLI arguments
  6. Compensating control

    Ensure access to OpenTelemetry traces and BuildKit daemon history records is kept secure.

Event History

Mar 17, 2025
CVE Published
via MITRE·07:21 PM
Data Sourced
via MITRE·07:21 PM
DescriptionWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·09:27 PM
May 27, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2025-0495?

CVE-2025-0495 is classified as a medium severity vulnerability affecting Docker Buildx.

2

How do I fix CVE-2025-0495?

To fix CVE-2025-0495, update Docker Buildx to the latest version that addresses this vulnerability.

3

What software is affected by CVE-2025-0495?

CVE-2025-0495 specifically affects Docker Buildx, which is a CLI plugin for Docker.

4

What are the potential risks of CVE-2025-0495?

The potential risks of CVE-2025-0495 include exposure of sensitive credentials through user input in cache configurations.

5

Is there a workaround for CVE-2025-0495?

As a workaround for CVE-2025-0495, avoid using user input for sensitive attributes in cache-to/cache-from configurations.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203