CVE-2023-30551: Github.com/sigstore/rekor Rekor's Compressed Archives Can Result Vulnerability

HIGH
Advisory Identifier: GHSA-2h5h-59f5-c5x9
CVSS 7.5
CWE-770
Published
Advisory Summary

CVE-2023-30551 is a HIGH (CVSS 7.5) rekor's compressed archives can result vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/sigstore/rekor libraries in the Go ecosystem. The issue involves rekor's compressed archives can result in oom conditions. Remediation is available by upgrading affected packages to version 1.1.1.

CVE-2023-30551 at a Glance

CVE Identifier CVE-2023-30551
GHSA Identifier GHSA-2h5h-59f5-c5x9
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Github.com/sigstore/rekor
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-30551

To remediate this vulnerability, upgrade all affected Github.com/sigstore/rekor 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/sigstore/rekor fixed: 1.1.1
Upgrade github.com/sigstore/rekor to 1.1.1
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/sigstore/rekor

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-30551, inspect your project dependencies for Github.com/sigstore/rekor:

inspect dependencies for github.com/sigstore/rekor

Analyze the terminal output to locate any version of Github.com/sigstore/rekor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.1), 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/sigstore/rekor, 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

## Summary Two vulnerabilities have been found in Rekor types for archive files JARs and APKs, where Rekor would crash due to out of memory conditions caused by reading archive metadata files into memory without checking their sizes first causing a Denial of Service of Rekor. These vulnerabilities were found through fuzzing with [OSS-Fuzz](https://google.github.io/oss-fuzz/). ## Vulnerability 1: OOM due to large files in META-INF directory of JAR files. ### Summary Verification of a JAR file submitted to Rekor can cause an out of memory crash if files within the META-INF directory of the JAR are sufficiently large. ### Details As part of verifying a JAR file, Rekor uses the [relic library](http://github.com/sassoftware/relic) to check that the JAR is signed, the signature verifies, and that the hashes in the signed manifest are all valid. This library function reads files within META-INF/ into memory without checking their sizes, resulting in an OOM if the uncompressed file is sufficiently large. Rekor is also not performing any such checks prior to passing the JAR to this library function. ### Patches Users should update to the latest version of Rekor, 1.1.1. ### Workaround There are no workarounds, users should update. ## Vulnerability 2: OOM due to large .SIGN and .PKGINFO files in APK files. ### Summary Parsing of an APK file submitted to Rekor can cause an out of memory crash if the .SIGN or .PKGINFO files within the APK are sufficiently large. ### Details When parsing an APK file, Rekor allocates byte slices to read both the .SIGN and .PKGINFO files into memory in order to verify the signature and hashes in the APK. These byte slices are allocated based on the size included in the tar header for each file, with no checks performed on that size. If the size in the header is sufficiently large, either because the uncompressed file is large or the size in the header has been artificially set to a large value, Rekor will crash due to an out of memory panic. ### Patches Users should update to the latest version of Rekor, 1.1.1. ### Workaround There are no workarounds, users should update.

CVE-2023-30551 Affected Github.com/sigstore/rekor Versions

1 component(s)
Fixed Versions:
1.1.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/sigstore/rekor
Go
< 1.1.1
1.1.1

References

Frequently Asked Questions

What is CVE-2023-30551?
CVE-2023-30551 is a security vulnerability in Github.com/sigstore/rekor involving Rekor's compressed archives can result in OOM conditions under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Github.com/sigstore/rekor versions are affected?
Affected versions include releases prior to 1.1.1 across affected packages: github.com/sigstore/rekor.
What version fixes CVE-2023-30551?
Upgrading to 1.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/sigstore/rekor affected?
Yes, github.com/sigstore/rekor is affected in releases prior to 1.1.1. Upgrade your dependency to 1.1.1 or later.
What is the CVSS score of CVE-2023-30551?
CVE-2023-30551 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-30551?
CVE-2023-30551 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-30551?
Run the dependency tree command: 'inspect dependencies for github.com/sigstore/rekor'. 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-2h5h-59f5-c5x9",
  "modified" : "2023-05-09T16:40:11Z",
  "published" : "2023-05-03T21:56:23Z",
  "aliases" : [ "CVE-2023-30551" ],
  "summary" : "Rekor's compressed archives can result in OOM conditions",
  "details" : "## Summary\nTwo vulnerabilities have been found in Rekor types for archive files JARs and APKs, where Rekor would crash due to out of memory conditions caused by reading archive metadata files into memory without checking their sizes first causing a Denial of Service of Rekor.\n\nThese vulnerabilities were found through fuzzing with [OSS-Fuzz](https://google.github.io/oss-fuzz/).\n\n## Vulnerability 1: OOM due to large files in META-INF directory of JAR files.\n### Summary\nVerification of a JAR file submitted to Rekor can cause an out of memory crash if files within the META-INF directory of the JAR are sufficiently large.\n\n### Details\nAs part of verifying a JAR file, Rekor uses the [relic library](http://github.com/sassoftware/relic) to check that the JAR is signed, the signature verifies, and that the hashes in the signed manifest are all valid. This library function reads files within META-INF/ into memory without checking their sizes, resulting in an OOM if the uncompressed file is sufficiently large. Rekor is also not performing any such checks prior to passing the JAR to this library function.\n\n### Patches\nUsers should update to the latest version of Rekor, 1.1.1.\n\n### Workaround\nThere are no workarounds, users should update.\n\n## Vulnerability 2: OOM due to large .SIGN and .PKGINFO files in APK files.\n### Summary\nParsing of an APK file submitted to Rekor can cause an out of memory crash if the .SIGN or .PKGINFO files within the APK are sufficiently large.\n\n### Details\nWhen parsing an APK file, Rekor allocates byte slices to read both the .SIGN and .PKGINFO files into memory in order to verify the signature and hashes in the APK. These byte slices are allocated based on the size included in the tar header for each file, with no checks performed on that size. If the size in the header is sufficiently large, either because the uncompressed file is large or the size in the header has been artificially set to a large value, Rekor will crash due to an out of memory panic.\n\n### Patches\nUsers should update to the latest version of Rekor, 1.1.1.\n\n### Workaround\nThere are no workarounds, users should update.",
  "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/sigstore/rekor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/rekor/security/advisories/GHSA-2h5h-59f5-c5x9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-30551"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/rekor/commit/cf42ace82667025fe128f7a50cf6b4cdff51cc48"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sigstore/rekor"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sigstore/rekor/releases/tag/v1.1.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-03T21:56:23Z",
    "nvd_published_at" : "2023-05-08T16:15:09Z"
  }
}