MAL-2026-17907
Vulnerability from ossf_malicious_packages
-= Per source details. Do not edit below this line.=-
Source: amazon-inspector (57da70f7efcc98515e5d5619ad18d558d39c772820ae1c6926b0081af6a0e6dd)
The package presents itself as an opencode plugin that guards shell commands, but its create.before hook contains a hidden branch keyed on the user's command containing npm run build. On that path it calls UnsealRpc.unseal({}) on a same-scope sibling dependency (@beloved-lenora/opencode-shared-rpc) to retrieve an AES-256-CBC key and base64 ciphertext, decrypts the ciphertext with createDecipheriv("aes-256-cbc",...), writes the resulting bytes to a hidden randomized path under ~/Library/Application Support/.k7Qm2/vX9pL4.sh, and rewrites the user's command to (npm run build || bash '<stager>') || rm -f '<stager>' so the dropped script runs and is then deleted. The payload is fully opaque (encrypted, delivered via a cross-package RPC, staged to a hidden dot-directory with random-looking names, and unlinked after execution), none of which is consistent with a shell-safety guard. The attacker-controlled bytes execute on the host of any user who installs the plugin and invokes a build command through the wrapped shell.
Source: ghsa-malware (122dea54602061507a3752f709f1e910d9126fdaf9fb282aeab13caca388b3e6)
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
{
"affected": [
{
"database_specific": {
"cwes": [
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
},
{
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature.",
"name": "Embedded Malicious Code"
}
],
"indicators": {
"evidence_files": [
{
"path": "index.ts",
"sha256": "284d21f11f49b1ab44da2f08f384ebd2353cefc7a63945e311c767b9194da474",
"tlsh": "b481240724f71c31049364a82f8ba849b33022277a45fac8ffed5f255f9e154e1e1399"
}
]
}
},
"package": {
"ecosystem": "npm",
"name": "@beloved-lenora/opencode-shell-guard"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"versions": [
"1.0.4"
]
}
],
"aliases": [
"GHSA-pm76-w63j-7j29"
],
"credits": [
{
"contact": [
"inspector-research@amazon.com"
],
"name": "Amazon Inspector",
"type": "FINDER"
}
],
"database_specific": {
"malicious-packages-origins": [
{
"id": "GHSA-pm76-w63j-7j29",
"import_time": "2026-10-16T19:21:51.052948437Z",
"modified_time": "2026-10-16T18:49:14Z",
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"sha256": "122dea54602061507a3752f709f1e910d9126fdaf9fb282aeab13caca388b3e6",
"source": "ghsa-malware"
},
{
"id": "IN-MAL-2026-021520",
"import_time": "2026-10-18T01:52:23.804965646Z",
"modified_time": "2026-10-18T01:49:59Z",
"sha256": "57da70f7efcc98515e5d5619ad18d558d39c772820ae1c6926b0081af6a0e6dd",
"source": "amazon-inspector",
"versions": [
"1.0.4"
]
}
]
},
"details": "\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (57da70f7efcc98515e5d5619ad18d558d39c772820ae1c6926b0081af6a0e6dd)\nThe package presents itself as an opencode plugin that guards shell commands, but its `create.before` hook contains a hidden branch keyed on the user\u0027s command containing `npm run build`. On that path it calls `UnsealRpc.unseal({})` on a same-scope sibling dependency (`@beloved-lenora/opencode-shared-rpc`) to retrieve an AES-256-CBC key and base64 ciphertext, decrypts the ciphertext with `createDecipheriv(\"aes-256-cbc\",...)`, writes the resulting bytes to a hidden randomized path under `~/Library/Application Support/.k7Qm2/vX9pL4.sh`, and rewrites the user\u0027s command to `(npm run build || bash \u0027\u003cstager\u003e\u0027) || rm -f \u0027\u003cstager\u003e\u0027` so the dropped script runs and is then deleted. The payload is fully opaque (encrypted, delivered via a cross-package RPC, staged to a hidden dot-directory with random-looking names, and unlinked after execution), none of which is consistent with a shell-safety guard. The attacker-controlled bytes execute on the host of any user who installs the plugin and invokes a build command through the wrapped shell.\n\n## Source: ghsa-malware (122dea54602061507a3752f709f1e910d9126fdaf9fb282aeab13caca388b3e6)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n",
"id": "MAL-2026-17907",
"modified": "2026-10-18T01:54:14.599561011Z",
"published": "2026-10-16T18:49:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-pm76-w63j-7j29"
},
{
"type": "PACKAGE",
"url": "https://www.npmjs.com/package/@beloved-lenora/opencode-shell-guard/v/1.0.4"
}
],
"schema_version": "1.7.4",
"summary": "Malicious code in @beloved-lenora/opencode-shell-guard (npm)"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
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.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.