{"id":"GHSA-9hfg-pxr6-q4vp","summary":"Use of a Broken or Risky Cryptographic Algorithm in crypto2","details":"The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to std::slice::from_raw_parts_mut, which breaks the contract and introduces undefined behavior.\n\nThis affects Chacha20 encryption and decryption in crypto2.","aliases":["CVE-2021-45709","GHSA-pmcv-mgcf-rvxg","RUSTSEC-2021-0121"],"modified":"2023-11-08T04:07:23.178602Z","published":"2022-01-06T22:04:51Z","database_specific":{"nvd_published_at":"2021-12-27T00:15:00Z","cwe_ids":["CWE-119"],"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2022-01-05T22:55:41Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45709"},{"type":"WEB","url":"https://github.com/shadowsocks/crypto2/issues/27"},{"type":"PACKAGE","url":"https://github.com/shadowsocks/crypto2"},{"type":"WEB","url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/crypto2/RUSTSEC-2021-0121.md"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2021-0121.html"}],"affected":[{"package":{"name":"crypto2","ecosystem":"crates.io","purl":"pkg:cargo/crypto2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.1.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/01/GHSA-9hfg-pxr6-q4vp/GHSA-9hfg-pxr6-q4vp.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}