Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2019-16760

Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration key. Usage of the `package` key to rename dependencies in `Cargo.toml` is ignored in Rust 1.25.0 and prior. When Rust 1.25.0 and prior is used Cargo may download the wrong dependency, which could be squatted on crates.io to be a malicious package. This not only affects manifests that you write locally yourself, but also manifests published to crates.io. Rust 1.0.0 through Rust 1.25.0 is affected by this advisory because Cargo will ignore the `package` key in manifests. Rust 1.26.0 through Rust 1.30.0 are not affected and typically will emit an error because the `package` key is unstable. Rust 1.31.0 and after are not affected because Cargo understands the `package` key. Users of the affected versions are strongly encouraged to update their compiler to the latest available one. Preventing this issue from happening requires updating your compiler to be either Rust 1.26.0 or newer. There will be no point release for Rust versions prior to 1.26.0. Users of Rust 1.19.0 to Rust 1.25.0 can instead apply linked patches to mitigate the issue.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2019-16760
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 08:44 UTC · Revision 1

Source evidence

CVE-2019-16760

core-osv · Original source

Published 30 Sept 2019, 22:15 UTC

Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration key. Usage of the `package` key to rename dependencies in `Cargo.toml` is ignored in Rust 1.25.0 and prior. When Rust 1.25.0 and prior is used Cargo may download the wrong dependency, which could be squatted on crates.io to be a malicious package. This not only affects manifests that you write locally yourself, but also manifests published to crates.io. Rust 1.0.0 through Rust 1.25.0 is affected by this advisory because Cargo will ignore the `package` key in manifests. Rust 1.26.0 through Rust 1.30.0 are not affected and typically will emit an error because the `package` key is unstable. Rust 1.31.0 and after are not affected because Cargo understands the `package` key. Users of the affected versions are strongly encouraged to update their compiler to the latest available one. Preventing this issue from happening requires updating your compiler to be either Rust 1.26.0 or newer. There will be no point release for Rust versions prior to 1.26.0. Users of Rust 1.19.0 to Rust 1.25.0 can instead apply linked patches to mitigate the issue.

osv:CVE-2019-16760
Complete source record
{
  "id": "1c1e7735a7e5c088c856f076779c8e0a3a97cfa0a6ae662245b92bedc9490d9d",
  "url": "https://osv.dev/vulnerability/CVE-2019-16760",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2019-16760",
    "summary": "Cargo prior to Rust 1.26.0 may download the wrong dependency if your package.toml file uses the `package` configuration key. Usage of the `package` key to rename dependencies in `Cargo.toml` is ignored in Rust 1.25.0 and prior. When Rust 1.25.0 and prior is used Cargo may download the wrong dependency, which could be squatted on crates.io to be a malicious package. This not only affects manifests that you write locally yourself, but also manifests published to crates.io. Rust 1.0.0 through Rust 1.25.0 is affected by this advisory because Cargo will ignore the `package` key in manifests. Rust 1.26.0 through Rust 1.30.0 are not affected and typically will emit an error because the `package` key is unstable. Rust 1.31.0 and after are not affected because Cargo understands the `package` key. Users of the affected versions are strongly encouraged to update their compiler to the latest available one. Preventing this issue from happening requires updating your compiler to be either Rust 1.26.0 or newer. There will be no point release for Rust versions prior to 1.26.0. Users of Rust 1.19.0 to Rust 1.25.0 can instead apply linked patches to mitigate the issue.",
    "evidence": "osv:CVE-2019-16760",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2019-16760",
      "aliases": [
        "CVE-2019-16760",
        "GHSA-9f3p-wvj7-q82x",
        "GHSA-phjm-8x66-qw4r"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/rust-lang/rust",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "a7756804103447ea4e68a71ccf071e7ad8f7a03e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.26.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.0.0-beta",
            "1.0.0-alpha.2",
            "1.0.0-alpha",
            "0.9",
            "0.8",
            "release-0.7",
            "0.7",
            "release-0.6",
            "0.6",
            "release-0.5",
            "0.5",
            "release-0.4",
            "0.4",
            "release-0.2",
            "0.2",
            "release-0.1",
            "0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-16760.json"
          }
        }
      ],
      "modified": "2026-10-24T10:49:50.123213307Z",
      "provider": "osv",
      "references": [
        "https://groups.google.com/forum/#%21topic/rustlang-security-announcements/rVQ5e3TDnpQ",
        "https://gist.github.com/pietroalbini/0d293b24a44babbeb6187e06eebd4992",
        "https://github.com/rust-lang/rust/security/advisories/GHSA-phjm-8x66-qw4r"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:*"
            ],
            "vendor_product": "rust-lang:rust",
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "1.26.0"
                  }
                ],
                "source": "CPE_RANGE"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2019-16760",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 441853,
  "published_at": "2019-09-30T22:15:10.313+00:00"
}