GHSA-3jch-9qgp-4844: Flatbuffers Generated Code Can Read And Vulnerability
CRITICALGHSA-3jch-9qgp-4844 is a CRITICAL (CVSS 9.8) generated code can read and vulnerability (General Security Weakness) affecting Flatbuffers libraries in the crates.io ecosystem. The issue involves generated code can read and write out of bounds in safe code. Remediation is available by upgrading affected packages to version 22.9.29.
GHSA-3jch-9qgp-4844 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix GHSA-3jch-9qgp-4844
To remediate this vulnerability, upgrade all affected Flatbuffers dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade flatbuffers to 22.9.29
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for flatbuffers
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3jch-9qgp-4844, inspect your project dependencies for Flatbuffers:
inspect dependencies for flatbuffers
Analyze the terminal output to locate any version of Flatbuffers in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 22.9.29), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Flatbuffers, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-3jch-9qgp-4844 Affected Flatbuffers Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flatbuffers
|
crates.io |
< 22.9.29
|
22.9.29
|
References
Frequently Asked Questions
What is GHSA-3jch-9qgp-4844?
Which Flatbuffers versions are affected?
What version fixes GHSA-3jch-9qgp-4844?
Is flatbuffers affected?
What is the CVSS score of GHSA-3jch-9qgp-4844?
What CWE is associated with GHSA-3jch-9qgp-4844?
How can I check crates.io dependencies for GHSA-3jch-9qgp-4844?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3jch-9qgp-4844",
"modified" : "2022-06-16T23:54:35Z",
"published" : "2022-06-16T23:54:35Z",
"aliases" : [ ],
"summary" : "Generated code can read and write out of bounds in safe code",
"details" : "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.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "flatbuffers"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "22.9.29"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/google/flatbuffers/issues/6627"
}, {
"type" : "WEB",
"url" : "https://github.com/google/flatbuffers/pull/7518"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/google/flatbuffers"
}, {
"type" : "WEB",
"url" : "https://github.com/google/flatbuffers/releases/tag/v22.9.29"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0122.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-16T23:54:35Z",
"nvd_published_at" : null
}
}