{"id":"GHSA-3jch-9qgp-4844","aliases":["GHSA-3jch-9qgp-4844","RUSTSEC-2021-0122"],"related":[],"kind":"vulnerability","state":"published","title":"Generated code can read and write out of bounds in safe code","summary":"Code generated by flatbuffers' compiler is `unsafe` but not marked as such.\nSee https://github.com/google/flatbuffers/issues/6627 for details.\n\nAll users that use generated code by `flatbuffers` compiler are recommended to:\n1. not expose flatbuffer generated code as part of their public APIs\n2. audit their code and look for any usage of `follow`, `push`, or any method that uses them\n   (e.g. `self_follow`).\n3. Carefuly go through the crates' documentation to understand which \"safe\" APIs are not\n   intended to be used.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Code generated by flatbuffers' compiler is `unsafe` but not marked as such.\nSee https://github.com/google/flatbuffers/issues/6627 for details.\n\nAll users that use generated code by `flatbuffers` compiler are recommended to:\n1. not expose flatbuffer generated code as part of their public APIs\n2. audit their code and look for any usage of `follow`, `push`, or any method that uses them\n   (e.g. `self_follow`).\n3. Carefuly go through the crates' documentation to understand which \"safe\" APIs are not\n   intended to be used.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Code generated by flatbuffers' compiler is `unsafe` but not marked as such.\nSee https://github.com/google/flatbuffers/issues/6627 for details.\n\nFor example, if generated code is used to decode malformed or untrusted input,\nundefined behavior (and thus security vulnerabilities) is possible even without\nthe use of the `unsafe` keyword, [violating the the meaning of \"safe\"](https://doc.rust-lang.org/std/keyword.unsafe.html#the-different-meanings-of-unsafe) code;\n\nAll users that use generated code by `flatbuffers` compiler are recommended to:\n1. not expose flatbuffer generated code as part of their public APIs\n2. audit their code and look for any usage of `follow`, `push`, or any method that uses them\n   (e.g. `self_follow`).\n3. Carefully go through the crates' documentation to understand which \"safe\" APIs are not\n   intended to be used.","format":"markdown","source":"rustsec"}],"published":"2021-10-31T12:00:00.000Z","modified":"2023-11-08T04:14:40.953Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"22.9.29"}],"ecosystem":"crates.io","package":"flatbuffers","purl":"pkg:cargo/flatbuffers","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"22.9.29"}],"ecosystem":"crates.io","package":"flatbuffers","purl":"pkg:cargo/flatbuffers","source":"rustsec"}],"references":[{"url":"https://github.com/google/flatbuffers/issues/6627","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/google/flatbuffers/pull/7518","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/google/flatbuffers","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/google/flatbuffers/releases/tag/v22.9.29","tags":["web"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0122.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/flatbuffers","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3jch-9qgp-4844","url":"https://github.com/advisories/GHSA-3jch-9qgp-4844","licence":"CC-BY-4.0","modified":"2023-11-08T04:14:40.953Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0122","url":"https://rustsec.org/advisories/RUSTSEC-2021-0122.html","licence":"CC0-1.0","modified":"2023-11-08T04:14:40.953Z"}],"updatedAt":"2026-11-25T22:56:43.068Z"}