The vulnerability stems from improper digest validation when fetching manifests. The commit fixes these two key areas: 1) In manifest.New, the patch explicitly parses and prioritizes the user-provided digest from the reference (WithRef) before falling back to registry headers, addressing CWE-345. 2) In referrerListByAPIPage, the patch clears the digest from the reference before passing it to manifest.New, ensuring the registry's response doesn't override the pinned digest. Both functions were modified in the security fix commit, and their pre-patch behavior aligns with the described vulnerability impact (ignoring pinned digests). The test cases added in manifest_test.go further confirm the digest validation logic was flawed in these functions.