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

> Attackers can read secrets from cache backend configurations if they are passed as CLI arguments and captured in OpenTelemetry traces.

- **Severity:** Medium 4.1 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 17 Mar 2025
- **Updated:** 18 Mar 2025
- **Also known as:** AZL-58854, AZL-58863, BELL-CVE-2025-0495, DEBIAN-CVE-2025-0495, GHSA-m4gq-fm9h-8q75, GO-2025-3527, SUSE-SU-2025:1341-1, SUSE-SU-2025:1344-1, UBUNTU-CVE-2025-0495, openSUSE-SU-2025:14980-1

## What is CVE-2025-0495?

CVE-2025-0495 is a medium-severity vulnerability in docker buildx, published on 17 Mar 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File)

## Which versions are affected by CVE-2025-0495?

3 open source packages ship an affected version, including github.com/docker/buildx.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/docker/buildx` | Go | All versions | 0.21.3 |
| `github.com/docker/buildx` | Go | All versions | 0.21.3 |
| `github.com/docker/buildx` | Go | All versions | 0.21.3 |
| `docker` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 27.5.1_ce-98.129.1 |
| `docker-stable` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 24.0.9_ce-1.14.1 |
| `docker-stable` | openSUSE:Tumbleweed | All versions | 24.0.9_ce-9.1 |

## How do I fix CVE-2025-0495?

Upgrade github.com/docker/buildx to 0.21.3 or later.

## Is CVE-2025-0495 being exploited?

There is no known exploitation of CVE-2025-0495 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-0495 and fix it if it is affected.

What it is: CVE-2025-0495 is a medium-severity vulnerability in docker buildx, published on 17 Mar 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-0495 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/docker/buildx (Go): affected all versions; fixed in 0.21.3
- github.com/docker/buildx (Go): affected all versions; fixed in 0.21.3
- github.com/docker/buildx (Go): affected all versions; fixed in 0.21.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-0495/ (Markdown: https://insights.sbomify.com/CVE-2025-0495/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-0495
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-0495
- OSV: https://osv.dev/vulnerability/CVE-2025-0495

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-0495/
Summaries are generated and may contain mistakes; the official description above is the record.
