Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-28031

An issue was discovered in the scratchpad crate before 1.3.1 for Rust. The move_elements function can have a double-free upon a panic in a user-provided f function.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-28031
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 06:15 UTC · Revision 1

Source evidence

CVE-2021-28031

core-osv · Original source

Published 5 Mar 2021, 09:15 UTC

An issue was discovered in the scratchpad crate before 1.3.1 for Rust. The move_elements function can have a double-free upon a panic in a user-provided f function.

osv:CVE-2021-28031
Complete source record
{
  "id": "c1ed3bdbf59b0a9d72339071cff476e86b445a1be5c98573a7aad0dcc38218c5",
  "url": "https://osv.dev/vulnerability/CVE-2021-28031",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-28031",
    "summary": "An issue was discovered in the scratchpad crate before 1.3.1 for Rust. The move_elements function can have a double-free upon a panic in a user-provided f function.",
    "evidence": "osv:CVE-2021-28031",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2021-28031",
      "aliases": [
        "CVE-2021-28031",
        "GHSA-3qm2-rfqw-fmrw",
        "RUSTSEC-2021-0030"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/okready/scratchpad",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "c97b1855e98bbcf12ec1b746bf4f5fce5c865b9c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:scratchpad_project:scratchpad:*:*:*:*:*:rust:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.3.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.3.0",
            "v1.2.0",
            "v1.1.0",
            "v1.0.1",
            "v1.0.0",
            "v1.0.0-beta.2",
            "v1.0.0-beta.1",
            "0.3.0",
            "0.2.0",
            "0.1.1",
            "0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-28031.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:37.441720400Z",
      "provider": "osv",
      "references": [
        "https://rustsec.org/advisories/RUSTSEC-2021-0030.html"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-28031",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 434227,
  "published_at": "2021-03-05T09:15:14.037+00:00"
}