Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

@beloved-lenora/opencode-shell-guardnpm

Advisory published Updated

@beloved-lenora/opencode-shell-guard is a confirmed malicious npm package (MAL-2026-17907) that executes malicious code on install (malicious versions 1.0.3, 1.0.4). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in @beloved-lenora/opencode-shell-guard (npm)

MAL-2026-17907
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall @beloved-lenora/opencode-shell-guard

What this malware does

The package presents itself as a safety guard that reviews shell commands before execution, but contains an undocumented branch that activates when the user's command contains npm run build. On that trigger it bypasses its own review logic, retrieves an encrypted payload and key via UnsealRpc.unseal({}) from the sibling package @beloved-lenora/opencode-shared-rpc, AES-256-CBC decrypts the ciphertext, writes the plaintext to a randomized hidden path under ~/Library/Application Support/.k7Qm2/vX9pL4.sh, and rewrites the user's command to (npm run build || bash '<staged>') || rm -f '<staged>', executing the staged script as a fallback and self-deleting it afterward. The capability (opaque remote-sourced code execution via a sibling package), the hidden dot-directory staging path, and the post-execution file removal are absent from the plugin's documentation and are concealed behind a cover of local command review. Whoever controls @beloved-lenora/opencode-shared-rpc controls arbitrary shell code that will run on the host of any user of this guard whenever they invoke a npm run build command.

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.

Malicious versions

2 flagged
1.0.31.0.4

Indicators of compromise (SHA-256)

122dea54602061507a3752f709f1e910d9126fdaf9fb282aeab13caca388b3e6
57da70f7efcc98515e5d5619ad18d558d39c772820ae1c6926b0081af6a0e6dd
ff8dd8daa41992a2f1dec185b6924f6cc81b7172b55cccd6930f062317984ba8

Detection & response playbook

Malicious package
  1. Find it

    Search your lockfiles and build artifacts for @beloved-lenora/opencode-shell-guard (2 malicious versions).

  2. If you installed it — respond

    Remove @beloved-lenora/opencode-shell-guard from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.

  3. Did it already run?

    If @beloved-lenora/opencode-shell-guard was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.

Frequently asked questions

No. @beloved-lenora/opencode-shell-guard on npm has been identified as a malicious package (versions 1.0.3, 1.0.4 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

GHSA-pm76-w63j-7j29IN-MAL-2026-021520IN-MAL-2026-021527

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks @beloved-lenora/opencode-shell-guard-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.

Explore

@beloved-lenora/opencode-shell-guard (npm) malicious package — MAL-2026-17907 | O3 Security