{"id":"CVE-2021-45697","aliases":["EUVD-2022-0483","GHSA-6p3c-v8vc-c244","GHSA-82hm-vh7g-hrh9","RUSTSEC-2021-0103"],"status":"published","title":"The `total_size` function for partial read the length of any `FixVec` is incorrect in molecule.","description":"An issue was discovered in the molecule crate before 0.7.2 for Rust. A FixVec partial read has an incorrect result.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.01361,"percentile":0.71985,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2021-07-30T12:00:00Z","modified":"2026-10-24T10:30:21Z","fixes":[{"ecosystem":"crates.io","package":"molecule","fixed_in":["0.7.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"molecule","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.7.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"molecule","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.7.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"molecule","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.7.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"molecule","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.7.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"molecule","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.7.2"}]}]}],"products":[{"vendor":"nervos","product":"molecule"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0103.html","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/molecule/RUSTSEC-2021-0103.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45697","tags":["advisory"]},{"url":"https://github.com/nervosnetwork/molecule/pull/49","tags":["web"]},{"url":"https://github.com/nervosnetwork/molecule/security/advisories/GHSA-82hm-vh7g-hrh9","tags":["web"]},{"url":"https://github.com/advisories/GHSA-6p3c-v8vc-c244"},{"url":"https://github.com/advisories/GHSA-82hm-vh7g-hrh9"},{"url":"https://github.com/nervosnetwork/molecule","tags":["package"]},{"url":"https://crates.io/crates/molecule","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-45697","description":"An issue was discovered in the molecule crate before 0.7.2 for Rust. A FixVec partial read has an incorrect result.","status":"published","published":"2021-12-26T21:49:49Z","modified":"2024-08-04T04:47:01.796Z","updated_at":"2026-11-02T14:33:02.580561Z"}],"euvd":[{"id":"EUVD-2022-0483","description":"An issue was discovered in the molecule crate before 0.7.2 for Rust. A FixVec partial read has an incorrect result.","status":"published","published":"2021-12-26T21:49:49Z","modified":"2024-08-04T04:47:01Z","updated_at":"2026-11-03T03:08:26.364792Z"}],"ghsa":[{"id":"GHSA-6p3c-v8vc-c244","title":"The `total_size` function for partial read the length of any `FixVec` is incorrect in molecule.","description":"Anyone who uses total_size(..) function to partial read the length of any FixVec will get an incorrect result, due to an incorrect implementation. This has been resolved in the 0.7.2 release.","status":"published","published":"2022-01-06T22:10:34Z","modified":"2023-06-13T18:33:18Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T14:36:53.654352Z"},{"id":"GHSA-82hm-vh7g-hrh9","title":"Partial read is incorrect in molecule","description":"### Impact\n\nAnyone who uses `total_size(..)` function to partial read the length of any `FixVec` will get an incorrect result, due to an incorrect implementation. This has been resolved in the 0.7.2 release.\n\n### Workarounds\n\nIf you already have the whole `FixVec` `A`, you can use `A.as_slice().len()` to get the total size of the `FixVec`.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- [Open an issue to ask use directly](https://github.com/nervosnetwork/molecule/issues/new).","status":"published","published":"2021-08-25T21:01:25Z","modified":"2023-01-11T05:05:27Z","updated_at":"2026-11-02T14:36:12.361159Z"}],"nvd":[{"id":"CVE-2021-45697","description":"An issue was discovered in the molecule crate before 0.7.2 for Rust. A FixVec partial read has an incorrect result.","status":"published","published":"2021-12-27T00:15:09.54Z","modified":"2026-06-17T04:13:58.1Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"updated_at":"2026-11-02T14:07:02.977492Z"}],"osv":[{"id":"CVE-2021-45697","description":"An issue was discovered in the molecule crate before 0.7.2 for Rust. A FixVec partial read has an incorrect result.","status":"published","published":"2021-12-27T00:15:09.54Z","modified":"2026-10-24T10:30:21.56291435Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:22.18434Z"},{"id":"GHSA-6p3c-v8vc-c244","title":"The `total_size` function for partial read the length of any `FixVec` is incorrect in molecule.","description":"Anyone who uses total_size(..) function to partial read the length of any FixVec will get an incorrect result, due to an incorrect implementation. This has been resolved in the 0.7.2 release.","status":"published","published":"2022-01-06T22:10:34Z","modified":"2023-11-08T04:07:22.503158Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:46:39.965326Z"},{"id":"GHSA-82hm-vh7g-hrh9","title":"Partial read is incorrect in molecule","description":"### Impact\n\nAnyone who uses `total_size(..)` function to partial read the length of any `FixVec` will get an incorrect result, due to an incorrect implementation. This has been resolved in the 0.7.2 release.\n\n### Workarounds\n\nIf you already have the whole `FixVec` `A`, you can use `A.as_slice().len()` to get the total size of the `FixVec`.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- [Open an issue to ask use directly](https://github.com/nervosnetwork/molecule/issues/new).","status":"published","published":"2021-08-25T21:01:25Z","modified":"2023-11-08T04:07:22.503158Z","updated_at":"2026-11-02T15:46:41.732368Z"},{"id":"RUSTSEC-2021-0103","title":" Partial read is incorrect in molecule","description":"Anyone who uses total_size(..) function to partial read the length of any FixVec will get an incorrect result, due to an incorrect implementation. This has been resolved in the 0.7.2 release.","status":"published","published":"2021-07-30T12:00:00Z","modified":"2026-10-12T18:00:03.464339634Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
