GHSA-7PWQ-F4PQ-78GM
Vulnerability from github – Published: 2022-08-11 15:43 – Updated: 2022-08-11 15:43The Rust Security Response WG and the crates.io team [were notified][1] on 2022-05-02 of the existence of the malicious crate rustdecimal, which contained malware. The crate name was intentionally similar to the name of the popular [rust_decimal][2] crate, hoping that potential victims would misspell its name (an attack called "typosquatting").
To protect the security of the ecosystem, the crates.io team permanently removed the crate from the registry as soon as it was made aware of the malware. An analysis of all the crates on crates.io was also performed, and no other crate with similar code patterns was found.
Keep in mind that the [rust_decimal][2] crate was not compromised, and it is still safe to use.
Analysis of the crate
The crate had less than 500 downloads since its first release on 2022-03-25, and no crates on the crates.io registry depended on it.
The crate contained identical source code and functionality as the legit rust_decimal crate, except for the Decimal::new function.
If your project or organization is running GitLab CI, we strongly recommend checking whether your project or one of its dependencies depended on the rustdecimal crate, starting from 2022-03-25. If you notice a dependency on that crate, you should consider your CI environment to be compromised.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "rustdecimal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [],
"github_reviewed": true,
"github_reviewed_at": "2022-08-11T15:43:35Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "The Rust Security Response WG and the crates.io team [were notified][1] on 2022-05-02 of the existence of the malicious crate `rustdecimal`, which contained malware. The crate name was intentionally similar to the name of the popular [`rust_decimal`][2] crate, hoping that potential victims would misspell its name (an attack called \"typosquatting\").\n\nTo protect the security of the ecosystem, the crates.io team permanently removed the crate from the registry as soon as it was made aware of the malware. An analysis of all the crates on crates.io was also performed, and no other crate with similar code patterns was found.\n\nKeep in mind that the [`rust_decimal`][2] crate was **not** compromised, and it is still safe to use.\n\n## Analysis of the crate\n\nThe crate had less than 500 downloads since its first release on 2022-03-25, and no crates on the crates.io registry depended on it.\n\nThe crate contained identical source code and functionality as the legit `rust_decimal` crate, except for the `Decimal::new` function.\n\nIf your project or organization is running GitLab CI, we strongly recommend checking whether your project or one of its dependencies depended on the `rustdecimal` crate, starting from 2022-03-25. If you notice a dependency on that crate, you should consider your CI environment to be compromised.",
"id": "GHSA-7pwq-f4pq-78gm",
"modified": "2022-08-11T15:43:35Z",
"published": "2022-08-11T15:43:35Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/paupino/rust-decimal/issues/514#issuecomment-1115408888"
},
{
"type": "WEB",
"url": "https://groups.google.com/g/rustlang-security-announcements/c/5DVtC8pgJLw?pli=1"
},
{
"type": "WEB",
"url": "https://raw.globalsecuritydatabase.org/GSD-2022-1002520"
},
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2022-0042.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "`rustdecimal` is a malicious crate"
}
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.