# GHSA-3jch-9qgp-4844: Generated code can read and write out of bounds in safe code

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2021-10-31T12:00:00.000Z
- Modified: 2023-11-08T04:14:40.953Z
- Also known as: RUSTSEC-2021-0122

## Description

Code generated by flatbuffers' compiler is `unsafe` but not marked as such.
See https://github.com/google/flatbuffers/issues/6627 for details.

All users that use generated code by `flatbuffers` compiler are recommended to:
1. not expose flatbuffer generated code as part of their public APIs
2. audit their code and look for any usage of `follow`, `push`, or any method that uses them
   (e.g. `self_follow`).
3. Carefuly go through the crates' documentation to understand which "safe" APIs are not
   intended to be used.

(As written by GitHub Advisory Database.)

## Affected

- flatbuffers (crates.io): before 22.9.29; from 0.0.0-0 before 22.9.29

## Every score

- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- RustSec Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/google/flatbuffers/issues/6627> (report, web)
- <https://github.com/google/flatbuffers/pull/7518> (web)
- <https://github.com/google/flatbuffers> (package)
- <https://github.com/google/flatbuffers/releases/tag/v22.9.29> (web)
- <https://rustsec.org/advisories/RUSTSEC-2021-0122.html> (advisory, web)
- <https://crates.io/crates/flatbuffers> (package)

## Sources

- GitHub Advisory Database: [GHSA-3jch-9qgp-4844](https://github.com/advisories/GHSA-3jch-9qgp-4844), CC-BY-4.0, modified 2023-11-08
- RustSec Advisory Database: [RUSTSEC-2021-0122](https://rustsec.org/advisories/RUSTSEC-2021-0122.html), CC0-1.0, modified 2023-11-08

---

Page: https://cve.day/GHSA-3jch-9qgp-4844 · Whole record: https://cve.day/GHSA-3jch-9qgp-4844.json · Rebuilt by cve.day 2026-11-25T22:56:43.068Z
