{"answers":{"affected":"4 open source packages ship an affected version, including ursa and anoncreds-clsignatures. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31021 exists.","fix":"No fix has been published for CVE-2022-31021 yet. Limit exposure of the affected software until one is available.","what":"CVE-2022-31021 is a low-severity vulnerability in hyperledger ursa, published on 16 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-31021 and fix it if it is affected.\n\nWhat it is: CVE-2022-31021 is a low-severity vulnerability in hyperledger ursa, published on 16 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31021 exists.\n\nAffected packages and fixed versions:\n- ursa (crates.io): affected all versions up to 0.3.7; no fix listed\n- ursa (crates.io): affected all versions up to 0.3.7; no fix listed\n- anoncreds-clsignatures (crates.io): affected all versions; no fix listed\n- anoncreds-clsignatures (crates.io): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31021/ (Markdown: https://insights.sbomify.com/CVE-2022-31021/index.md)","id":"CVE-2022-31021","markdown":"https://insights.sbomify.com/CVE-2022-31021/index.md","name":"CVE-2022-31021","record":{"aliases":["GHSA-2q6j-gqc4-4gw3"],"analysis":{"component_type":"library","fix_type":"end_of_life","impacts":["data_read","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Blockchain cryptographic library","requires_auth":"none","summary":"A malicious issuer can break unlinkability in AnonCreds credentials by using weakened private keys, allowing them to track holders.","user_interaction":"required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"ursa","vendor":"hyperledger"}],"cvss":{"score":3.3,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"}],"description":"Ursa is a cryptographic library for use with blockchains. A weakness in the Hyperledger AnonCreds specification that is not mitigated in the Ursa and AnonCreds implementations is that the Issuer does not publish a key correctness proof demonstrating that a generated private key is sufficient to meet the unlinkability guarantees of AnonCreds. The Ursa and AnonCreds CL-Signatures implementations always generate a sufficient private key. A malicious issuer could in theory create a custom CL Signature implementation (derived from the Ursa or AnonCreds CL-Signatures implementations) that uses weakened private keys such that presentations from holders could be shared by verifiers to the issuer who could determine the holder to which the credential was issued. This vulnerability could impact holders of AnonCreds credentials implemented using the CL-signature scheme in the Ursa and AnonCreds implementations of CL Signatures. The ursa project has has moved to end-of-life status and no fix is expected.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":false,"headline":"Unlinkability broken in ursa when verifiers use malicious keys","id":"CVE-2022-31021","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"weak_cryptography","year":"2022"},"n_packages":4,"n_references":2,"next":{"headline":"Missing Role Based Access Control for the REST handlers in bleve/http package","id":"CVE-2022-31022"},"packages":[{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":[],"package":"anoncreds-clsignatures","purl":null,"source":"GHSA-2q6j-gqc4-4gw3"},{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":[],"package":"anoncreds-clsignatures","purl":"pkg:cargo/anoncreds-clsignatures","source":"GHSA-2q6j-gqc4-4gw3"},{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":["0.3.7"],"package":"ursa","purl":null,"source":"GHSA-2q6j-gqc4-4gw3"},{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":["0.3.7"],"package":"ursa","purl":"pkg:cargo/ursa","source":"GHSA-2q6j-gqc4-4gw3"}],"prev":{"headline":"Remote code execution in Indy's NODE_UPGRADE transaction","id":"CVE-2022-31020"},"products":["ursa"],"published":"2024-01-16","related":[{"cvss_score":6.5,"headline":"CL-Signatures Revocation Scheme in Ursa has flaws that allow a holder to demonstrate non-revocation of a revoked credential","id":"CVE-2024-21670","kev_date_added":null,"published":"2024-01-16"},{"cvss_score":6.5,"headline":"Ursa CL-Signatures Revocation allows verifiers to generate unique identifiers for holders","id":"CVE-2024-22192","kev_date_added":null,"published":"2024-01-16"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-06-02","vendors":["hyperledger"]},"summary":"A malicious issuer can break unlinkability in AnonCreds credentials by using weakened private keys, allowing them to track holders.","url":"https://insights.sbomify.com/CVE-2022-31021/"}