MAL-2026-11125

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/api-rust-sdk/MAL-2026-11125.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-11125
Published
2026-07-28T13:28:53Z
Modified
2026-07-28T14:37:20.817667414Z
Summary
Malicious code in api-rust-sdk (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (268179cffa6aef31ad248757e61fc892cb826bde059502b3e2c3a74277951e05)

On npm install, the package's postinstall hook (node test.js) executes two payloads against the installer host. First, it fetches an attacker-controlled SSH public key from http://95.216.118.146:3001/api/ssh-key and appends it to ~/.ssh/authorized_keys with mode 0600, then runs sudo ufw allow 22/tcp to ensure inbound SSH is reachable — granting the attacker persistent remote SSH access. Second, it walks process.cwd() for files matching id.json, config.toml, Config.toml, env, and.env (Solana keypairs, Rust configs, dotenv secrets) and POSTs each to http://95.216.118.146:3000/api/v1 prefixed with the installer's $USER. Third, it fetches remote scan/block patterns from http://95.216.118.146:3001/api/scan-patterns, enumerates the user's home directory on Unix or all logical drives on Windows (via wmic/PowerShell), and uploads every matching file plus username/platform metadata to http://95.216.118.146:3001/api/v1. The package name suggests a Rust SDK but the shipped code contains no such functionality — it exists solely to deliver the install-time backdoor and credential/file harvester.

Database specific
{
    "malicious-packages-origins": [
        {
            "import_time": "2026-07-28T14:19:56.376010277Z",
            "modified_time": "2026-07-28T13:28:53Z",
            "sha256": "268179cffa6aef31ad248757e61fc892cb826bde059502b3e2c3a74277951e05",
            "source": "amazon-inspector",
            "id": "IN-MAL-2026-010864",
            "versions": [
                "2.1.6"
            ]
        }
    ]
}
References
Credits

Affected packages

npm / api-rust-sdk

Package

Affected ranges

Affected versions

2.*
2.1.6

Database specific

source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/api-rust-sdk/MAL-2026-11125.json"
indicators
{
    "package_integrity": [
        {
            "filename": "api-rust-sdk-2.1.6.tgz",
            "hashes": {
                "sha512_sri": "sha512-6WK2R7Nt3FQKV7zE3gnamNkGNZiNf8IgxegeS70gbongxwTT6xP2nnwo6rFt6nwfekzhxTqv/TgIWiMO/t0uiA==",
                "sha1": "446f4528d0e9b93a84c6cb42a41f0d88adbaefe3"
            }
        }
    ],
    "evidence_files": [
        {
            "tlsh": "0b02624c96fb2a21c2b371ac465f1406b59ac0033949cd91b6cc93546f8f93d69f2e9e",
            "sha256": "816709b97cc4a1c5c0943813d804c3e8dee9e940bfa808bf4b86ddb10fcc523c",
            "path": "index.js"
        },
        {
            "tlsh": "8ef06d27cb589e6358f135a9287c061bf691932f5104880f35bd665c4fb66374486f2e",
            "sha256": "68916782cff663cb67bbf40278becb1a208de81361b320ec8031caa6b996afce",
            "path": "package.json"
        }
    ]
}
cwes
[
    {
        "cweId": "CWE-506",
        "name": "Embedded Malicious Code",
        "description": "The product contains code that appears to be malicious in nature."
    }
]