{"id":"GHSA-pfr9-2p92-qrhq","aliases":["GHSA-pfr9-2p92-qrhq","RUSTSEC-2024-0377"],"related":[],"kind":"vulnerability","state":"published","title":"Databento Binary Encoding (DBN) has a heap buffer overflow using c_chars_to_str function","summary":"The `heap-buffer-overflow` is triggered in the `strlen()` function when handling the `c_chars_to_str` function in the dbn crate. This vulnerability occurs because the `CStr::from_ptr()` function in Rust assumes that the provided C string is null-terminated. However, there is no guarantee that the input chars array passed to the c_chars_to_str function is properly null-terminated.\n\nIf the chars array does not contain a null byte (\\0), strlen() will continue to read beyond the bounds of the buffer in search of a null terminator. This results in an out-of-bounds memory read and can lead to a heap-buffer-overflow, potentially causing memory corruption or exposing sensitive information.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"The `heap-buffer-overflow` is triggered in the `strlen()` function when handling the `c_chars_to_str` function in the dbn crate. This vulnerability occurs because the `CStr::from_ptr()` function in Rust assumes that the provided C string is null-terminated. However, there is no guarantee that the input chars array passed to the c_chars_to_str function is properly null-terminated.\n\nIf the chars array does not contain a null byte (\\0), strlen() will continue to read beyond the bounds of the buffer in search of a null terminator. This results in an out-of-bounds memory read and can lead to a heap-buffer-overflow, potentially causing memory corruption or exposing sensitive information.","format":"markdown","source":"ghsa"}],"published":"2024-10-07T12:00:00.000Z","modified":"2026-05-20T01:00:15.746Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-126"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.22.1"}],"ecosystem":"crates.io","package":"dbn","purl":"pkg:cargo/dbn","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.22.1-0"}],"ecosystem":"crates.io","package":"dbn","purl":"pkg:cargo/dbn","source":"rustsec"}],"references":[{"url":"https://github.com/databento/dbn/issues/67","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/databento/dbn/commit/339efb90fdb980920a5e8829008abc1114f4bfdd","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/databento/dbn","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0377.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/dbn","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pfr9-2p92-qrhq","url":"https://github.com/advisories/GHSA-pfr9-2p92-qrhq","licence":"CC-BY-4.0","modified":"2026-05-20T01:00:15.746Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0377","url":"https://rustsec.org/advisories/RUSTSEC-2024-0377.html","licence":"CC0-1.0","modified":"2025-10-28T06:29:25.627Z"}],"updatedAt":"2026-11-25T22:56:43.217Z"}