Описание
Evolver has Prototype Pollution via Object.assign() in its mailbox store operations
Summary
A prototype pollution vulnerability in the mailbox store module allows attackers to modify the behavior of all JavaScript objects by injecting malicious properties into Object.prototype. The vulnerability exists in the _applyUpdate() and _updateRecord() functions which use Object.assign() to merge user-controlled data without filtering dangerous keys like __proto__, constructor, or prototype.
Details
The vulnerability exists in src/proxy/mailbox/store.js at lines 123 and 145:
The vulnerability can be triggered when an attacker has the ability to write to the messages.jsonl file (used for mailbox persistence). By crafting a malicious JSONL entry with __proto__ as a field key, the attacker can pollute the prototype of all objects.
The data flows from:
messages.jsonlfile →readLines()function (line 47) →_rebuildIndex()(line 113) →_applyUpdate()(line 121) →Object.assign()pollutes prototype
PoC
Prerequisites:
- Node.js installed
- Access to write to the mailbox messages file
Steps to reproduce:
- Create a test file demonstrating the vulnerability:
- Run the test:
Expected output:
Note: Modern Node.js versions have some prototype pollution protections. For a successful exploit, the attacker might need to use alternative property paths like constructor.prototype.isAdmin.
Attack scenario: If an attacker can write to the mailbox messages file (e.g., through file upload, path traversal, or compromised backup restore), they can:
Impact
This is a Prototype Pollution vulnerability that can lead to:
- Property injection affecting all JavaScript objects
- Authentication/authorization bypass
- Application logic manipulation
- Denial of service via prototype corruption
- Potential remote code execution if polluted properties affect security-critical code paths
Attack requirements: The attacker needs write access to the messages.jsonl file. This could be achieved through:
- File upload vulnerabilities
- Path traversal (combined with the Arbitrary File Write vulnerability in the fetch command)
- Compromised backup files
- Shared hosting environments
Affected users: Anyone using the mailbox functionality in multi-user environments or with persistent message storage.
Пакеты
@evomap/evolver
< 1.69.3
1.69.3
Связанные уязвимости
Evolver is a GEP-powered self-evolving engine for AI agents. Prior to version 1.69.3, a prototype pollution vulnerability in the mailbox store module allows attackers to modify the behavior of all JavaScript objects by injecting malicious properties into Object.prototype. The vulnerability exists in the _applyUpdate() and _updateRecord() functions which use Object.assign() to merge user-controlled data without filtering dangerous keys like __proto__, constructor, or prototype. This issue has been patched in version 1.69.3.