Malicious code in @selfpentest/eslint-pentest-plugin (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (f338876601180482b20a42fbd799b9d4e1b059bf7d733b5db448f7fc6d3455ff) Package presents itself as an ESLint plugin but the exported plugin object is an empty shell. index.js unconditionally invokes a steal() routine at top level, so any require() of the package (including ESLint auto-loading the plugin) triggers the payload. The payload reads process.env.HOME and process.env.SECRET, reads the first 30 bytes of ~/.ssh/known_hosts via fs.readFileSync(path.join(os.homedir(), '/.ssh/known_hosts')), and issues an HTTP GET to http://localhost:1337/eslint with the collected values as URL query parameters. The package.json description and README state that the package 'pretends to be an eslint plugin but it steals secrets instead' and identify it as a supply-chain-attack demonstration. The exfiltration destination is loopback (127.0.0.1:1337), so bytes do not leave the host unless a local listener collects them, but the credential-read code path executes on every require of the package.
MAL-2026-17293
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:MAL-2026-17293
@selfpentest/eslint-pentest-plugin
Source reference: /affected/0/package/name
- Affected versions
- 1.0.0
Source reference:
/affected/0/versions - Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"package": {
"name": "@selfpentest/eslint-pentest-plugin",
"purl": "pkg:npm/%40selfpentest/eslint-pentest-plugin",
"ecosystem": "npm"
},
"versions": [
"1.0.0"
],
"database_specific": {
"cwes": [
{
"name": "Embedded Malicious Code",
"cweId": "CWE-506",
"description": "The product contains code that appears to be malicious in nature."
}
],
"source": "https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@selfpentest/eslint-pentest-plugin/MAL-2026-17293.json",
"indicators": {
"evidence_files": [
{
"path": "index.js",
"tlsh": "d8119e1650f65221829271a3771f290335bee6cb3a09ecb83bdcd7748f88b258152de9",
"sha256": "4299593b6cc9e88ec41e682e468ea27d34804f5694ddec71d1c2cac2d38d8fa6"
},
{
"path": "package.json",
"tlsh": "a7e068250613216301d0a5672c369177b255cf7f149dfd6c13f7222856cd2672079649",
"sha256": "27512851e1461aa83ddba172f573737992f8ca9a033bcf31a15d1fc5875993b9"
}
],
"package_integrity": [
{
"hashes": {
"sha1": "3a4d96643a1db041909f9cae37d7ad1623448d56",
"sha512_sri": "sha512-5/SiGKSa1+H/uugWShhf0cvOMXcXFvKPZFm5yGpmgB9Cl4Ey8hJFH7hRmBcQ8sNcp0TdQ6b9/8mqvg10UkaFeQ=="
},
"filename": "eslint-pentest-plugin-1.0.0.tgz"
}
]
}
}
}
]Publisher severity
No explicit severity was provided.
- Event
- #31934 · Revision 1
- Added to Heist Feed
- Publisher date