Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/vulndb: potential Go vuln in github.com/anchore/syft: CVE-2023-24827 #1533

Closed
GoVulnBot opened this issue Feb 7, 2023 · 3 comments
Closed
Assignees
Labels
excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module.

Comments

@GoVulnBot
Copy link

CVE-2023-24827 references github.com/anchore/syft, which may be a Go module.

Description:
syft is a a CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems. A password disclosure flaw was found in Syft versions v0.69.0 and v0.69.1. This flaw leaks the password stored in the SYFT_ATTEST_PASSWORD environment variable. The SYFT_ATTEST_PASSWORD environment variable is for the syft attest command to generate attested SBOMs for the given container image. This environment variable is used to decrypt the private key (provided with syft attest --key <path-to-key-file>) during the signing process while generating an SBOM attestation. This vulnerability affects users running syft that have the SYFT_ATTEST_PASSWORD environment variable set with credentials (regardless of if the attest command is being used or not). Users that do not have the environment variable SYFT_ATTEST_PASSWORD set are not affected by this issue. The credentials are leaked in two ways: in the syft logs when -vv or -vvv are used in the syft command (which is any log level >= DEBUG) and in the attestation or SBOM only when the syft-json format is used. Note that as of v0.69.0 any generated attestations by the syft attest command are uploaded to the OCI registry (if you have write access to that registry) in the same way cosign attach is done. This means that any attestations generated for the affected versions of syft when the SYFT_ATTEST_PASSWORD environment variable was set would leak credentials in the attestation payload uploaded to the OCI registry. This issue has been patched in commit 9995950c70 and has been released as v0.70.0. There are no workarounds for this vulnerability. Users are advised to upgrade.

References:

Cross references:
No existing reports found with this module or alias.

See doc/triage.md for instructions on how to triage this report.

modules:
  - module: github.com/anchore/syft
    packages:
      - package: syft
description: |
    syft is a a CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems. A password disclosure flaw was found in Syft versions v0.69.0 and v0.69.1. This flaw leaks the password stored in the SYFT_ATTEST_PASSWORD environment variable. The `SYFT_ATTEST_PASSWORD` environment variable is for the `syft attest` command to generate attested SBOMs for the given container image. This environment variable is used to decrypt the private key (provided with `syft attest --key <path-to-key-file>`) during the signing process while generating an SBOM attestation. This vulnerability affects users running syft that have the `SYFT_ATTEST_PASSWORD` environment variable set with credentials (regardless of if the attest command is being used or not). Users that do not have the environment variable `SYFT_ATTEST_PASSWORD` set are not affected by this issue. The credentials are leaked in two ways: in the syft logs when `-vv` or `-vvv` are used in the syft command (which is any log level >= `DEBUG`) and in the attestation or SBOM only when the `syft-json` format is used. Note that as of v0.69.0 any generated attestations by the `syft attest` command are uploaded to the OCI registry (if you have write access to that registry) in the same way `cosign attach` is done. This means that any attestations generated for the affected versions of syft when the `SYFT_ATTEST_PASSWORD` environment variable was set would leak credentials in the attestation payload uploaded to the OCI registry. This issue has been patched in commit `9995950c70` and has been released as v0.70.0. There are no workarounds for this vulnerability. Users are advised to upgrade.
cves:
  - CVE-2023-24827
references:
  - web: https://github.com/anchore/syft/security/advisories/GHSA-jp7v-3587-2956
  - fix: https://github.com/anchore/syft/commit/9995950c70e849f9921919faffbfcf46401f71f3

@tatianab tatianab added the excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module. label Feb 8, 2023
@tatianab tatianab self-assigned this Feb 10, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/467396 mentions this issue: data/excluded: batch add excluded reports

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/592759 mentions this issue: data/reports: unexclude 75 reports

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/606782 mentions this issue: data/reports: unexclude 20 reports (2)

gopherbot pushed a commit that referenced this issue Aug 20, 2024
  - data/reports/GO-2023-1512.yaml
  - data/reports/GO-2023-1520.yaml
  - data/reports/GO-2023-1524.yaml
  - data/reports/GO-2023-1527.yaml
  - data/reports/GO-2023-1533.yaml
  - data/reports/GO-2023-1541.yaml
  - data/reports/GO-2023-1542.yaml
  - data/reports/GO-2023-1543.yaml
  - data/reports/GO-2023-1544.yaml
  - data/reports/GO-2023-1550.yaml
  - data/reports/GO-2023-1551.yaml
  - data/reports/GO-2023-1552.yaml
  - data/reports/GO-2023-1553.yaml
  - data/reports/GO-2023-1554.yaml
  - data/reports/GO-2023-1555.yaml
  - data/reports/GO-2023-1560.yaml
  - data/reports/GO-2023-1577.yaml
  - data/reports/GO-2023-1581.yaml
  - data/reports/GO-2023-1582.yaml
  - data/reports/GO-2023-1583.yaml

Updates #1512
Updates #1520
Updates #1524
Updates #1527
Updates #1533
Updates #1541
Updates #1542
Updates #1543
Updates #1544
Updates #1550
Updates #1551
Updates #1552
Updates #1553
Updates #1554
Updates #1555
Updates #1560
Updates #1577
Updates #1581
Updates #1582
Updates #1583

Change-Id: I6a2829acd39b6e598b81e8138e6d126128073198
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/606782
Auto-Submit: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
excluded: EFFECTIVELY_PRIVATE This vulnerability exists in a package can be imported, but isn't meant to be outside that module.
Projects
None yet
Development

No branches or pull requests

3 participants