# CVE-2023-25656: notation-go has excessive memory allocation on verification

> Attackers can cause excessive memory allocation during signature verification, leading to application crashes and denial of service.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Feb 2023
- **Updated:** 27 Nov 2024
- **Also known as:** GHSA-87x9-7grx-m28v, GO-2023-1589

## What is CVE-2023-25656?

CVE-2023-25656 is a high-severity denial of service vulnerability in notaryproject notation-go, published on 20 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

notation-go is a collection of libraries for supporting Notation sign, verify, push, and pull of oci artifacts. Prior to version 1.0.0-rc.3, notation-go users will find their application using excessive memory when verifying signatures. The application will be killed, and thus availability is impacted. The problem has been patched in the release v1.0.0-rc.3. Some workarounds are available. Users can review their own trust policy file and check if the identity string contains `=#`. Meanwhile, users should only put trusted certificates in their trust stores referenced by their own trust policy files, and make sure the `authenticity` validation is set to `enforce`.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2023-25656?

3 open source packages ship an affected version, including github.com/notaryproject/notation-go. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/notaryproject/notation-go` | Go | All versions | 1.0.0-rc.3 |
| `github.com/notaryproject/notation-go` | Go | All versions | 1.0.0-rc.3 |
| `github.com/notaryproject/notation-go` | Go | All versions | 1.0.0-rc.3 |

Products: Notaryproject Notation-Go.

## How do I fix CVE-2023-25656?

Upgrade github.com/notaryproject/notation-go to 1.0.0-rc.3 or later.

## Is CVE-2023-25656 being exploited?

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

## Other vulnerabilities in notaryproject notation-go

- [CVE-2023-33959](https://insights.sbomify.com/CVE-2023-33959/): Verification bypass can cause users into verifying the wrong artifact (high 8.4)
- [CVE-2023-33958](https://insights.sbomify.com/CVE-2023-33958/): Default `maxSignatureAttempts` in `notation verify` enables an endless data attack in notation (medium 5.4)
- [CVE-2024-23332](https://insights.sbomify.com/CVE-2024-23332/): Client configured with permissive trust policies susceptible to rollback attack in Notary Project (medium 4.0)
- [CVE-2024-51491](https://insights.sbomify.com/CVE-2024-51491/): Process crash during CRL-based revocation check on OS using separate mount point for temp Directory in notation-go (low 3.3)
- [CVE-2023-33957](https://insights.sbomify.com/CVE-2023-33957/): Denial of service from high number of artifact signatures in notation (low 2.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-25656 and fix it if it is affected.

What it is: CVE-2023-25656 is a high-severity denial of service vulnerability in notaryproject notation-go, published on 20 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-25656 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/notaryproject/notation-go (Go): affected all versions; fixed in 1.0.0-rc.3
- github.com/notaryproject/notation-go (Go): affected all versions; fixed in 1.0.0-rc.3
- github.com/notaryproject/notation-go (Go): affected all versions; fixed in 1.0.0-rc.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-2023-25656/ (Markdown: https://insights.sbomify.com/CVE-2023-25656/index.md)
```

## Sources

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

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