GHSA-pfr9-2p92-qrhq: Dbn Databento Binary Encoding (DBN) Has Vulnerability

MODERATE
CVSS 5.5
CWE-126
Published
Advisory Summary

GHSA-pfr9-2p92-qrhq is a MODERATE (CVSS 5.5) databento binary encoding (dbn) has vulnerability (CWE-126: Buffer Over-read) affecting Dbn libraries in the crates.io ecosystem. The issue involves databento binary encoding (dbn) has a heap buffer overflow using c_chars_to_str function. Remediation is available by upgrading affected packages to version 0.22.1.

GHSA-pfr9-2p92-qrhq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-pfr9-2p92-qrhq
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-126: Buffer Over-read
Affected Product Dbn
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix GHSA-pfr9-2p92-qrhq

To remediate this vulnerability, upgrade all affected Dbn dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

dbn fixed: 0.22.1
Upgrade dbn to 0.22.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for dbn

How to Check if You Are Affected

To determine whether your application is affected by GHSA-pfr9-2p92-qrhq, inspect your project dependencies for Dbn:

inspect dependencies for dbn

Analyze the terminal output to locate any version of Dbn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.22.1), 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 CWE-126: Buffer Over-read, where the product reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations after the targeted buffer. In Dbn, 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

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. If 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.

GHSA-pfr9-2p92-qrhq Affected Dbn Versions

1 component(s)
Fixed Versions:
0.22.1
Product / Package Ecosystem Affected Versions Fixed Version
dbn
crates.io
< 0.22.1
0.22.1

References

Frequently Asked Questions

What is GHSA-pfr9-2p92-qrhq?
GHSA-pfr9-2p92-qrhq is a security vulnerability in Dbn involving Databento Binary Encoding (DBN) has a heap buffer overflow using c_chars_to_str function under CWE-126: Buffer Over-read.
Which Dbn versions are affected?
Affected versions include releases prior to 0.22.1 across affected packages: dbn.
What version fixes GHSA-pfr9-2p92-qrhq?
Upgrading to 0.22.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dbn affected?
Yes, dbn is affected in releases prior to 0.22.1. Upgrade your dependency to 0.22.1 or later.
What is the CVSS score of GHSA-pfr9-2p92-qrhq?
GHSA-pfr9-2p92-qrhq has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-pfr9-2p92-qrhq?
GHSA-pfr9-2p92-qrhq is classified under CWE-126: Buffer Over-read (The product reads from a buffer using buffer access mechanisms such as indexes or pointers that reference memory locations after the targeted buffer.).
How can I check crates.io dependencies for GHSA-pfr9-2p92-qrhq?
Run the dependency tree command: 'inspect dependencies for dbn'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pfr9-2p92-qrhq",
  "modified" : "2026-05-20T00:56:56Z",
  "published" : "2024-10-09T14:34:24Z",
  "aliases" : [ ],
  "summary" : "Databento Binary Encoding (DBN) has a heap buffer overflow using c_chars_to_str function",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "dbn"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.22.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.22.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/databento/dbn/issues/67"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/databento/dbn/commit/339efb90fdb980920a5e8829008abc1114f4bfdd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/databento/dbn"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0377.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-126" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-09T14:34:24Z",
    "nvd_published_at" : null
  }
}