Togoder security

npm package security report

eventemitter2@6.4.9 security report

Risky patterns found that deserve a look.

Needs review Version 6.4.9 Files reviewed 2 Size 43.5 KB Scanned

Summary

Togoder Security scanned the npm package eventemitter2@6.4.9 on Oct 4, 2026. An AI review of 2 source files produced 4 low severity findings. The overall verdict is medium: the findings flag risky but common patterns (dynamic code, unsafe defaults, broad file or network access) rather than confirmed malware.

0
critical
0
high
0
medium
4
low

Findings 4

low

Potential prototype pollution / unsafe property access

NPS-5427C2F85106

The wildcard growListenerTree and searchListenerTree functions write to tree[name] using event-name segments (split by delimiter) without validating that segments are safe property names such as __proto__, constructor, or prototype. Event names like __proto__ could pollute Object.prototype on the internal tree object. However, this is a known behavioral characteristic of this library and not actively exploited in the code.

lib/eventemitter2.js
low

Dynamic import / module loading

NPS-E7FCD8B3EA4B

No dynamic imports, require() of computed paths, or external module loading present.

lib/eventemitter2.js
low

No install/build time hooks

NPS-E703F07A3860

The file only defines an event emitter; no npm lifecycle scripts, no top-level network/file/process operations are executed on import besides assigning module.exports or a global. new Function is invoked only in the non-module/browser fallback path.

lib/eventemitter2.js
low

Dynamic code execution

NPS-C6CB47376F0C

Uses new Function('','return this')() to obtain the global object in the non-AMD/non-CommonJS fallback branch. This is a form of dynamic code generation/execution and can violate Content Security Policy (CSP) and bypass certain sandboxing. While the intent is to obtain the global this, new Function constructs code at runtime.

lib/eventemitter2.js:1310

Files reviewed

FileVerdictWhat the reviewer saw
lib/eventemitter2.js medium This is the legitimate EventEmitter2 library; the only notable concern is the new Function global-object retrieval fallback, which is low risk and standard practice for UMD wrappers.
index.js safe Cleared by Jev triage; no further analysis needed

Frequently asked questions

Is eventemitter2 safe to use?

No confirmed malware was found in eventemitter2@6.4.9, but the review flagged 4 low severity findings for risky patterns worth checking before you rely on it.

Does eventemitter2 contain malware?

No malware was identified in eventemitter2@6.4.9 when Togoder Security scanned it on Oct 4, 2026. A new version can still introduce malicious code, so scan the exact versions in your lockfile.

How was eventemitter2 checked?

Togoder Security downloaded the published npm package and had an AI model read its 2 source files, looking for install scripts, credential access, network exfiltration, obfuscation, backdoors and crypto-wallet theft. The results are cached by file hash and shown here.

How do I scan eventemitter2 together with the rest of my dependencies?

Upload your lockfile at https://security.togoder.click/scan or call the API documented at https://security.togoder.click/api-docs. Files that have already been scanned, like the ones in eventemitter2@6.4.9, cost nothing.

Related security reports