Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. magic-crypt
  4. ›
  5. GHSA-gmx7-gr5q-85w5

GHSA-gmx7-gr5q-85w5: magic-crypt uses insecure cryptographic algorithms

December 30, 2024

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.

References

  • github.com/advisories/GHSA-gmx7-gr5q-85w5
  • github.com/magiclen/rust-magiccrypt
  • github.com/magiclen/rust-magiccrypt/issues/17
  • rustsec.org/advisories/RUSTSEC-2024-0430.html

Code Behaviors & Features

Detect and mitigate GHSA-gmx7-gr5q-85w5 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 4.0.1

Solution

Unfortunately, there is no solution available yet.

Weakness

  • CWE-326: Inadequate Encryption Strength

Source file

cargo/magic-crypt/GHSA-gmx7-gr5q-85w5.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:31 +0000.