CVE-2023-25656: Github.com/notaryproject/notation go Notation-go Has Excessive Memory Allocation Vulnerability

HIGH
Advisory Identifier: GHSA-87x9-7grx-m28v
CVSS 7.5
CWE-770
Published
Advisory Summary

CVE-2023-25656 is a HIGH (CVSS 7.5) notation-go has excessive memory allocation vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/notaryproject/notation go libraries in the Go ecosystem. The issue involves notation-go has excessive memory allocation on verification. Remediation is available by upgrading affected packages to version 1.0.0-rc.3.

CVE-2023-25656 at a Glance

CVE Identifier CVE-2023-25656
GHSA Identifier GHSA-87x9-7grx-m28v
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Github.com/notaryproject/notation go
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-25656

To remediate this vulnerability, upgrade all affected Github.com/notaryproject/notation go 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/notaryproject/notation-go fixed: 1.0.0-rc.3
Upgrade github.com/notaryproject/notation-go to 1.0.0-rc.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/notaryproject/notation-go

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-25656, inspect your project dependencies for Github.com/notaryproject/notation go:

inspect dependencies for github.com/notaryproject/notation-go

Analyze the terminal output to locate any version of Github.com/notaryproject/notation go in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-rc.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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Github.com/notaryproject/notation go, 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 `notation-go` users will find their application using excessive memory when verifying signatures and the application will be finally killed, and thus availability is impacted. ### Patches The problem has been patched in the release [v1.0.0-rc.3](https://github.com/notaryproject/notation-go/releases/tag/v1.0.0-rc.3). Users should upgrade their `notation-go` packages to `v1.0.0-rc.3` or above. ### Workarounds 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` ### Credits The `notation-go` project would like to thank Adam Korczynski (@AdamKorcz) for responsibly disclosing this issue during a security fuzzing audit sponsored by CNCF and Shiwei Zhang (@shizhMSFT) for root cause analysis and detailed vulnerability report. ### References - [Resource exhaustion attacks](https://en.wikipedia.org/wiki/Resource_exhaustion_attack)

CVE-2023-25656 Affected Github.com/notaryproject/notation go Versions

1 component(s)
Fixed Versions:
1.0.0-rc.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/notaryproject/notation-go
Go
< 1.0.0-rc.3
1.0.0-rc.3

References

Frequently Asked Questions

What is CVE-2023-25656?
CVE-2023-25656 is a security vulnerability in Github.com/notaryproject/notation go involving notation-go has excessive memory allocation on verification under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Github.com/notaryproject/notation go versions are affected?
Affected versions include releases prior to 1.0.0-rc.3 across affected packages: github.com/notaryproject/notation-go.
What version fixes CVE-2023-25656?
Upgrading to 1.0.0-rc.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/notaryproject/notation-go affected?
Yes, github.com/notaryproject/notation-go is affected in releases prior to 1.0.0-rc.3. Upgrade your dependency to 1.0.0-rc.3 or later.
What is the CVSS score of CVE-2023-25656?
CVE-2023-25656 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-25656?
CVE-2023-25656 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Go dependencies for CVE-2023-25656?
Run the dependency tree command: 'inspect dependencies for github.com/notaryproject/notation-go'. 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-87x9-7grx-m28v",
  "modified" : "2023-02-22T00:03:49Z",
  "published" : "2023-02-22T00:03:49Z",
  "aliases" : [ "CVE-2023-25656" ],
  "summary" : "notation-go has excessive memory allocation on verification",
  "details" : "### Impact\n\n`notation-go` users will find their application using excessive memory when verifying signatures and the application will be finally killed, and thus availability is impacted.\n\n### Patches\n\nThe problem has been patched in the release [v1.0.0-rc.3](https://github.com/notaryproject/notation-go/releases/tag/v1.0.0-rc.3). Users should upgrade their `notation-go` packages to `v1.0.0-rc.3` or above.\n\n### Workarounds\n\nUsers 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`\n\n### Credits\n\nThe `notation-go` project would like to thank Adam Korczynski (@AdamKorcz) for responsibly disclosing this issue during a security fuzzing audit sponsored by CNCF and Shiwei Zhang (@shizhMSFT) for root cause analysis and detailed vulnerability report.\n\n### References\n\n- [Resource exhaustion attacks](https://en.wikipedia.org/wiki/Resource_exhaustion_attack)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/notaryproject/notation-go"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0-rc.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/notaryproject/notation-go/security/advisories/GHSA-87x9-7grx-m28v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25656"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/notaryproject/notation-go/pull/275"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/notaryproject/notation-go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/notaryproject/notation-go/releases/tag/v1.0.0-rc.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-22T00:03:49Z",
    "nvd_published_at" : "2023-02-20T16:15:00Z"
  }
}