hi, we are a security team. We found a Prototype Pollution vulnerability in your project.
Vulnerability Type: Prototype Pollution
Vulnerability Cause: An attacker can construct a malicious object with the _callbacks property pointing explicitly to Object.prototype. When this object is mixed into Emitter() and the on() method is called, the assignment this._callbacks['$' + event] = ... writes directly to Object.prototype, causing global prototype pollution.
Affected Code Location: package/package/lib/cjs/index.js:45
POC Payload:
{ _callbacks: Object.prototype } with event argument 'polluted'
POC Call Code:
const maliciousObj = { _callbacks: Object.prototype };
const emitter = Emitter(maliciousObj);
emitter.on('polluted', function() {});
Verification Output:
[CASE_ID=TP0002] [VULN_BOTH] Global and local prototype pollution via _callbacks manipulation
hi, we are a security team. We found a Prototype Pollution vulnerability in your project.
Vulnerability Type: Prototype Pollution
Vulnerability Cause: An attacker can construct a malicious object with the _callbacks property pointing explicitly to Object.prototype. When this object is mixed into Emitter() and the on() method is called, the assignment this._callbacks['$' + event] = ... writes directly to Object.prototype, causing global prototype pollution.
Affected Code Location: package/package/lib/cjs/index.js:45
POC Payload:
POC Call Code:
Verification Output: