# CVE-2025-27403: Ratify Azure authentication providers can leak authentication tokens to non-Azure container registries

> Attackers can leak Azure authentication tokens to malicious registries if Ratify is configured with Azure providers, allowing potential abuse of ACR access.

- **Severity:** High 7.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:H/SI:H/SA:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 11 Mar 2025
- **Updated:** 11 Mar 2025
- **Also known as:** GHSA-44f7-5fj5-h4px, GO-2025-3511

## What is CVE-2025-27403?

CVE-2025-27403 is a high-severity vulnerability in ratify-project ratify, published on 11 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Ratify is a verification engine as a binary executable and on Kubernetes which enables verification of artifact security metadata and admits for deployment only those that comply with policies the user creates. In a Kubernetes environment, Ratify can be configured to authenticate to a private Azure Container Registry (ACR). The Azure workload identity and Azure managed identity authentication providers are configured in this setup. Users that configure a private ACR to be used with the Azure authentication providers may be impacted by a vulnerability that exists in versions prior to 1.2.3 and 1.3.2. Both Azure authentication providers attempt to exchange an Entra ID (EID) token for an ACR refresh token. However, Ratify’s Azure authentication providers did not verify that the target registry is an ACR. This could have led to the EID token being presented to a non-ACR registry during token exchange. EID tokens with ACR access can potentially be extracted and abused if a user workload contains an image reference to a malicious registry. As of versions 1.2.3 and 1.3.2, the Azure workload identity and Azure managed identity authentication providers are updated to add new validation prior to EID token exchange. Validation relies upon registry domain validation against a pre-configured list of well-known ACR endpoints. EID token exchange will be executed only if at least one of the configured well-known domain suffixes (wildcard support included) matches the registry domain of the image reference.

Weakness: CWE-287 (Improper Authentication)

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

8 open source packages ship an affected version, including github.com/ratify-project/ratify and github.com/deislabs/ratify.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/ratify-project/ratify` | Go | All versions | 1.2.3 |
| `github.com/ratify-project/ratify` | Go | All versions | 1.2.3 |
| `github.com/ratify-project/ratify` | Go | From 1.3.0 | 1.3.2 |
| `github.com/ratify-project/ratify` | Go | From 1.3.0 | 1.3.2 |
| `github.com/ratify-project/ratify` | Go | From 1.3.0 | 1.3.2 |
| `github.com/deislabs/ratify` | Go | All versions | 1.2.3 |
| `github.com/deislabs/ratify` | Go | All versions | 1.2.3 |
| `github.com/deislabs/ratify` | Go | All versions | 1.2.3 |

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

Upgrade github.com/ratify-project/ratify to a fixed version for your release line: 1.2.3 or 1.3.2.

## Is CVE-2025-27403 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-27403 is a high-severity vulnerability in ratify-project ratify, published on 11 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-27403 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/ratify-project/ratify (Go): affected all versions; fixed in 1.2.3
- github.com/ratify-project/ratify (Go): affected all versions; fixed in 1.2.3
- github.com/ratify-project/ratify (Go): affected from 1.3.0; fixed in 1.3.2
- github.com/ratify-project/ratify (Go): affected from 1.3.0; fixed in 1.3.2
- github.com/ratify-project/ratify (Go): affected from 1.3.0; fixed in 1.3.2
- github.com/deislabs/ratify (Go): affected all versions; fixed in 1.2.3
- github.com/deislabs/ratify (Go): affected all versions; fixed in 1.2.3
- github.com/deislabs/ratify (Go): affected all versions; fixed in 1.2.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-27403/ (Markdown: https://insights.sbomify.com/CVE-2025-27403/index.md)
```

## Sources

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

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