GHSA-77h3-w9rx-hj3q: Scratchpad :Tracking Can Cause Heap Buffer Vulnerability
MODERATEGHSA-77h3-w9rx-hj3q is a MODERATE :tracking can cause heap buffer vulnerability (CWE-122: Heap-based Buffer Overflow) affecting Scratchpad libraries in the crates.io ecosystem. The issue involves :tracking can cause heap buffer overflows. Remediation is available in the latest vendor maintenance releases.
GHSA-77h3-w9rx-hj3q at a Glance
How to Fix GHSA-77h3-w9rx-hj3q
To remediate this vulnerability, upgrade all affected Scratchpad 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 scratchpad to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for scratchpad
How to Check if You Are Affected
To determine whether your application is affected by GHSA-77h3-w9rx-hj3q, inspect your project dependencies for Scratchpad:
inspect dependencies for scratchpad
Analyze the terminal output to locate any version of Scratchpad in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-122: Heap-based Buffer Overflow, where a heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). In Scratchpad, 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-77h3-w9rx-hj3q Affected Scratchpad Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
scratchpad
|
crates.io |
≤ 1.3.1
|
|
References
Frequently Asked Questions
What is GHSA-77h3-w9rx-hj3q?
Which Scratchpad versions are affected?
What version fixes GHSA-77h3-w9rx-hj3q?
Is scratchpad affected?
What CWE is associated with GHSA-77h3-w9rx-hj3q?
How can I check crates.io dependencies for GHSA-77h3-w9rx-hj3q?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-77h3-w9rx-hj3q",
"modified" : "2025-08-14T22:23:02Z",
"published" : "2025-08-14T22:23:02Z",
"aliases" : [ ],
"summary" : "User-defined implementations of the safe trait scratchpad::Tracking can cause heap buffer overflows",
"details" : "The `get` and `set` methods of the public trait `scratchpad::Tracking` interact with unsafe code regions in the crate, and they influence the computation of addresses returned as raw pointers. However, the trait itself is not marked as unsafe, meaning users may provide custom implementations under the assumption that the crate upholds all safety guarantees.\n\nThis becomes problematic because even safe implementations of `get` and `set`-written without using any unsafe code-can still result in ill-formed raw pointers. These pointers may later be dereferenced within safe APIs of the crate (e.g., `marker::MarkerBack::allocate_slice_copy`), potentially leading to arbitrary memory access or heap buffer overflows.\n\nAccording to the [penultimate commit](https://github.com/okready/scratchpad/commit/957dee1a3902f48600b06910e8e0b1d5ee7dab83), the crate is in maintenance mode awaiting a cleanup that will reduce the area of unsafe code. Note that the last commits to the repository are from 4 years ago.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "scratchpad"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/okready/scratchpad/issues/2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/okready/scratchpad"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2025-0049.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-122" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-14T22:23:02Z",
"nvd_published_at" : null
}
}