GHSA-gmx7-gr5q-85w5: Magic crypt Magic-crypt Uses Insecure Cryptographic Algorithms Vulnerability

LOW
CWE-326
Published
Advisory Summary

GHSA-gmx7-gr5q-85w5 is a LOW magic-crypt uses insecure cryptographic algorithms vulnerability (CWE-326: Inadequate Encryption Strength) affecting Magic crypt libraries in the crates.io ecosystem. The issue involves magic-crypt uses insecure cryptographic algorithms. Remediation is available in the latest vendor maintenance releases.

GHSA-gmx7-gr5q-85w5 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gmx7-gr5q-85w5
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-326: Inadequate Encryption Strength
Affected Product Magic crypt
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-gmx7-gr5q-85w5

To remediate this vulnerability, upgrade all affected Magic crypt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

magic-crypt fixed: Latest secure release
Upgrade magic-crypt to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for magic-crypt

How to Check if You Are Affected

To determine whether your application is affected by GHSA-gmx7-gr5q-85w5, inspect your project dependencies for Magic crypt:

inspect dependencies for magic-crypt

Analyze the terminal output to locate any version of Magic crypt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-326: Inadequate Encryption Strength, where the product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. In Magic crypt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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](https://github.com/magiclen/rust-magiccrypt/issues/17).

GHSA-gmx7-gr5q-85w5 Affected Magic crypt Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
magic-crypt
crates.io
≤ 4.0.1

References

Frequently Asked Questions

What is GHSA-gmx7-gr5q-85w5?
GHSA-gmx7-gr5q-85w5 is a security vulnerability in Magic crypt involving magic-crypt uses insecure cryptographic algorithms under CWE-326: Inadequate Encryption Strength.
Which Magic crypt versions are affected?
Affected versions include releases prior to current release patches across affected packages: magic-crypt.
What version fixes GHSA-gmx7-gr5q-85w5?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is magic-crypt affected?
Yes, magic-crypt is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-gmx7-gr5q-85w5?
GHSA-gmx7-gr5q-85w5 is classified under CWE-326: Inadequate Encryption Strength (The product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.).
How can I check crates.io dependencies for GHSA-gmx7-gr5q-85w5?
Run the dependency tree command: 'inspect dependencies for magic-crypt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gmx7-gr5q-85w5",
  "modified" : "2024-12-30T16:53:24Z",
  "published" : "2024-12-30T16:53:24Z",
  "aliases" : [ ],
  "summary" : "magic-crypt uses 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.\n\n`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.\n\n`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.\n\nEach of the implementations are unsound in that they use uninitialized memory without `MaybeUninit` or equivalent structures.\n\nFor more information, visit the [issue](https://github.com/magiclen/rust-magiccrypt/issues/17).\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "magic-crypt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "4.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/magiclen/rust-magiccrypt/issues/17"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/magiclen/rust-magiccrypt"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2024-0430.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-326" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-30T16:53:24Z",
    "nvd_published_at" : null
  }
}