{"answers":{"affected":"3 open source packages ship an affected version, including magic-crypt.","exploited":"There is no known exploitation of GHSA-gmx7-gr5q-85w5 in the wild and no public exploit code.","fix":"No fix has been published for GHSA-gmx7-gr5q-85w5 yet. Limit exposure of the affected software until one is available.","what":"GHSA-gmx7-gr5q-85w5 is a vulnerability in magic-crypt, published on 28 Dec 2024."},"fix_prompt":"Check this codebase for GHSA-gmx7-gr5q-85w5 and fix it if it is affected.\n\nWhat it is: GHSA-gmx7-gr5q-85w5 is a vulnerability in magic-crypt, published on 28 Dec 2024. \nExploitation: There is no known exploitation of GHSA-gmx7-gr5q-85w5 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- magic-crypt (crates.io): affected all versions up to 4.0.1; no fix listed\n- magic-crypt (crates.io): affected all versions up to 4.0.1; no fix listed\n- magic-crypt (crates.io): affected from 0.0.0-0; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-gmx7-gr5q-85w5/ (Markdown: https://insights.sbomify.com/GHSA-gmx7-gr5q-85w5/index.md)","id":"GHSA-gmx7-gr5q-85w5","markdown":"https://insights.sbomify.com/GHSA-gmx7-gr5q-85w5/index.md","name":"GHSA-gmx7-gr5q-85w5","record":{"aliases":["RUSTSEC-2024-0430"],"analysis":{"component_type":"library","fix_type":"no_fix_stated","impacts":["data_read","security_bypass"],"network_reachable":"unknown","non_default_config":false,"product_category":"Rust cryptography library","requires_auth":"none","summary":"The magic-crypt Rust library uses insecure DES encryption and lacks integrity checks, allowing attackers to decrypt data via padding oracle attacks.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"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).","ecosystems":["crates.io"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"magic-crypt uses insecure cryptographic algorithms","id":"GHSA-gmx7-gr5q-85w5","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"weak_cryptography","year":"2024"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":["4.0.1"],"package":"magic-crypt","purl":null,"source":"GHSA-gmx7-gr5q-85w5"},{"ecosystem":"crates.io","fixed":[],"introduced":["0"],"last_affected":["4.0.1"],"package":"magic-crypt","purl":"pkg:cargo/magic-crypt","source":"GHSA-gmx7-gr5q-85w5"},{"ecosystem":"crates.io","fixed":[],"introduced":["0.0.0-0"],"last_affected":[],"package":"magic-crypt","purl":"pkg:cargo/magic-crypt","source":"RUSTSEC-2024-0430"}],"products":null,"published":"2024-12-28","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"The magic-crypt Rust library uses insecure DES encryption and lacks integrity checks, allowing attackers to decrypt data via padding oracle attacks.","url":"https://insights.sbomify.com/GHSA-gmx7-gr5q-85w5/"}