Malicious code in @junyoung-kim/reins (npm)
The @junyoung-kim/reins npm package versions 0.1.6 and 0.1.7 contain malicious code that establishes a remote shell on the host. It spawns a local pseudo-terminal and connects it bidirectionally to a hardcoded WebSocket relay, allowing remote interactive shell access. The package can persist this remote access by installing itself as a systemd auto-start service. The pairing secret used for authentication is loaded from parent-directory .env files, expanding the trust boundary beyond the package directory. This behavior enables an attacker controlling the relay or possessing a valid token to execute arbitrary commands on the affected system.
AI Analysis
Technical Summary
The reins CLI in versions 0.1.6 and 0.1.7 spawns a local pseudo-terminal via node-pty, defaulting to /bin/bash or cmd.exe, and bridges it bidirectionally to a hardcoded WebSocket endpoint (wss://juny-api.kr/relay). Pairing coordination occurs through https://arv.juny-api.kr, with the pairing secret loaded from parent-directory .env files, thus widening the trust boundary. Bytes received from the relay peer are directly written into the PTY, granting interactive shell execution to anyone with a valid pairing token or the relay operator. The package can install itself as a systemd auto-start service, maintaining persistent remote shell access across reboots. Static analysis also identified PATH modifications consistent with installing shims for the CLI and node-pty runtime.
Potential Impact
An attacker who controls the relay server or obtains a valid pairing token can gain interactive shell access on the host running the affected reins CLI. This allows arbitrary command execution with the privileges of the user running the CLI. The persistence mechanism via systemd auto-start service enables the remote shell channel to survive system reboots, increasing the risk of long-term compromise. The loading of pairing secrets from parent-directory .env files expands the attack surface by trusting files outside the package directory.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately discontinue use of the affected versions 0.1.6 and 0.1.7 of the @junyoung-kim/reins package. Remove any installed instances and systemd services related to this package. Audit systems for unauthorized remote shell access and revoke any credentials or tokens associated with the relay service. Monitor for suspicious network connections to wss://juny-api.kr/relay or https://arv.juny-api.kr. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Malicious code in @junyoung-kim/reins (npm)
Description
The @junyoung-kim/reins npm package versions 0.1.6 and 0.1.7 contain malicious code that establishes a remote shell on the host. It spawns a local pseudo-terminal and connects it bidirectionally to a hardcoded WebSocket relay, allowing remote interactive shell access. The package can persist this remote access by installing itself as a systemd auto-start service. The pairing secret used for authentication is loaded from parent-directory .env files, expanding the trust boundary beyond the package directory. This behavior enables an attacker controlling the relay or possessing a valid token to execute arbitrary commands on the affected system.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The reins CLI in versions 0.1.6 and 0.1.7 spawns a local pseudo-terminal via node-pty, defaulting to /bin/bash or cmd.exe, and bridges it bidirectionally to a hardcoded WebSocket endpoint (wss://juny-api.kr/relay). Pairing coordination occurs through https://arv.juny-api.kr, with the pairing secret loaded from parent-directory .env files, thus widening the trust boundary. Bytes received from the relay peer are directly written into the PTY, granting interactive shell execution to anyone with a valid pairing token or the relay operator. The package can install itself as a systemd auto-start service, maintaining persistent remote shell access across reboots. Static analysis also identified PATH modifications consistent with installing shims for the CLI and node-pty runtime.
Potential Impact
An attacker who controls the relay server or obtains a valid pairing token can gain interactive shell access on the host running the affected reins CLI. This allows arbitrary command execution with the privileges of the user running the CLI. The persistence mechanism via systemd auto-start service enables the remote shell channel to survive system reboots, increasing the risk of long-term compromise. The loading of pairing secrets from parent-directory .env files expands the attack surface by trusting files outside the package directory.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately discontinue use of the affected versions 0.1.6 and 0.1.7 of the @junyoung-kim/reins package. Remove any installed instances and systemd services related to this package. Audit systems for unauthorized remote shell access and revoke any credentials or tokens associated with the relay service. Monitor for suspicious network connections to wss://juny-api.kr/relay or https://arv.juny-api.kr. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13432
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a7573b6bf8831d539d93c25
Added to database: 08/07/2026, 05:57:10 UTC
Last enriched: 08/07/2026, 07:17:14 UTC
Last updated: 09/18/2026, 02:09:48 UTC
Views: 24
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.