rustsec-2024-0430
Vulnerability from osv_rustsec
Published
2024-12-28 12:00
Modified
2025-10-28 06:02
Summary
Use of insecure cryptographic algorithms
Details

This crate uses a number of cryptographic algorithms that are no longer considered secure and it uses them in ways that do not guarantee the integrity of the encrypted data.

MagicCrypt64 uses the insecure DES block cipher in CBC mode without authentication. This allows for practical brute force and padding oracle attacks and does not protect the integrity of the encrypted data. Key and IV are generated from user input using CRC64, which is not at all a key derivation function.

MagicCrypt64, MagicCrypt128, MagicCrypt192, and MagicCrypt256 are all vulnerable to padding-oracle attacks. None of them protect the integrity of the ciphertext. Furthermore, none use password-based key derivation functions, even though the key is intended to be generated from a password.

Each of the implementations are unsound in that they use uninitialized memory without MaybeUninit or equivalent structures.

For more information, visit the issue.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "crypto-failure"
        ],
        "cvss": null,
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "magic-crypt",
        "purl": "pkg:cargo/magic-crypt"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "GHSA-gmx7-gr5q-85w5"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "This crate uses a number of cryptographic algorithms that are no longer\nconsidered secure and it uses them in ways that do not guarantee the integrity\nof the encrypted data.\n\n`MagicCrypt64` uses the insecure DES block cipher in CBC mode without\nauthentication. This allows for practical brute force and padding oracle\nattacks and does not protect the integrity of the encrypted data. Key and IV\nare generated from user input using CRC64, which is not at all a key derivation\nfunction.\n\n`MagicCrypt64`, `MagicCrypt128`, `MagicCrypt192`, and `MagicCrypt256` are all\nvulnerable to padding-oracle attacks. None of them protect the integrity of the\nciphertext. Furthermore, none use password-based key derivation functions, even\nthough the key is intended to be generated from a password.\n\nEach of the implementations are unsound in that they use uninitialized memory\nwithout `MaybeUninit` or equivalent structures.\n\nFor more information, visit the [issue](https://github.com/magiclen/rust-magiccrypt/issues/17).",
  "id": "RUSTSEC-2024-0430",
  "modified": "2025-10-28T06:02:18Z",
  "published": "2024-12-28T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/magic-crypt"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2024-0430.html"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/magiclen/rust-magiccrypt/issues/17"
    }
  ],
  "related": [],
  "severity": [],
  "summary": "Use of insecure cryptographic algorithms"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…