GitHub Advisoryadvisory · Go

GHSA-r2xv-vpr2-42m9 slsa-verifier vulnerable to mproper validation of npm's publish attestations

LOW Published 2023-11-08 Modified 2023-11-09 Official page ↗
Ecosystem
Go
Packages
github.com/slsa-framework/slsa-verifier/v2, github.com/slsa-framework/slsa-verifier
Severity
Low
Reviewed
2023-11-08

Affected packages

• Go github.com/slsa-framework/slsa-verifier/v2: < 2.4.1-rc.0 → fixed in 2.4.1-rc.0 • Go github.com/slsa-framework/slsa-verifier: <= 1.4.1 (no fix yet)

Description

Summary `slsa-verifier attestations_tampered.json` 5. `SLSA_VERIFIER_EXPERIMENTAL=1 slsa-verifier verify-npm-package supreme-goggles.tgz --attestations-path attestations_tampered.json --builder-id "https://github.com/actions/runner/github-hosted" --package-name "@trishankatdatadog/supreme-goggles" --package-version 1.0.5 --source-uri github.com/trishankatdatadog/supreme-goggles` 6. The result is that `slsa-verifier` fails to detect this tampering of the publish attestation (unlike with the provenance attestation) and returns `PASSED`. Impact An attacker who controls what packages and attestations are shown to a user _can_ associate a package with an arbitrary name and version that do _not_ match what the user expects from the publish attestation. Furthermore, the package digest in the publish attestation need _not_ match its counterpart in the provenance attestation. However, the attacker _cannot_ associate the given package with an arbitrary source and builder that the user does not expect from the provenance attestation. Thus, the attacker could, for example, convince package managers to install authentic but older versions of packages that contain known, exploitable vulnerabilities. Severity is considered low because 1) it does not invalidate the provenance and 2) support for npm is currently experimental. Patches Fixed by PR #705 and released in versions `>=2.4.1`. Workarounds There is no easy way for users to fix or remediate this vulnerability without upgrading, short of verifying npm's publish attestations themselves, _and_ cross-verifying it against GHA's provenance attestations. References • Original OpenSSF Slack thread

References