# CVE-2021-28031: RUSTSEC-2021-0030 - move_elements can double-free objects on panic

Source: https://junglewise.ai/threats/cve-2021-28031-move-elements-can-double-free-objects-on-panic  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-02-18  
License: CC BY 4.0 with a link back

CVE-2021-28031 · Severity: low · CVSS 3.1 · Published 2021-02-18

move_elements can double-free objects on panic

Technologies: [scratchpad (crates.io)](https://junglewise.ai/threats/technologies/scratchpad). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2021-28031 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-28031 being exploited in the wild.

**How severe is CVE-2021-28031?** Low severity, with a CVSS score of 3.1, published 18 February 2021.

**Which products and versions are affected?** scratchpad (crates.io) SEMVER:introduced=0,fixed=1.3.1, SEMVER:introduced=0.0.0-0,fixed=1.3.1.

**Is there a fix for CVE-2021-28031?** Yes. scratchpad (crates.io): upgrade to 1.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-28031?** Check whether you run scratchpad (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- scratchpad (crates.io): upgrade to 1.3.1 or later

  ```sh
  cargo update -p scratchpad
  ```


## Affected products

- scratchpad (crates.io) SEMVER:introduced=0,fixed=1.3.1, SEMVER:introduced=0.0.0-0,fixed=1.3.1

## Identifiers

- CVE-2021-28031
- GHSA-3qm2-rfqw-fmrw
- RUSTSEC-2021-0030

## Related threats

- [User-defined implementations of the safe trait scratchpad::Tracking can cause heap buffer overflows](https://junglewise.ai/threats/user-defined-implementations-of-the-safe-trait-scratchpad-tracking-can-5ed8f576)
- [RUSTSEC-2025-0049 - User-defined implementations of the safe trait scratchpad::Tracking can cause heap buffer overflows](https://junglewise.ai/threats/rustsec-2025-0049-user-defined-implementations-of-the-safe-trait-a721ad23)
