#734·vConsole

Prototype Pollution in network.model.ts

Author: zer0diaCreated Apr 16, 2026Updated Apr 16, 2026

hello. This is LY Security Assessment Team. Share the security vulnerabilities we found.

vConsole Version: 3.16.0-alpha(de7026df97148799c3efcd29577e3eda0788362f)

issue

https://github.com/Tencent/vConsole/blob/de7026df97148799c3efcd29577e3eda0788362f/src/network/network.model.ts#L66-L89

Possible prototype pollution due to missing id validation in updateRequest in network.model.ts.

updateRequest resolves reqList[id] without validating the id parameter. When id is "__proto__", reqList["__proto__"] returns Object.prototype (via the __proto__ accessor on plain objects), and !!Object.prototype evaluates to true. The subsequent for..in loop then writes all enumerable properties of data directly onto Object.prototype, resulting in global prototype pollution.

This is reachable through two public APIs:

  • vConsole.network.update(id, item) in network.exporter.ts — passes id directly to updateRequest
  • vConsole.network.add(item) in network.exporter.ts — copies item.id onto the internal proxy via for..in, then passes it to updateRequest

Note: setOption() was previously patched for the same class of vulnerability by adding __proto__ / constructor / prototype key checks (core.ts#L518-L521), but the same mitigation was not applied to updateRequest.

poc

javascript
// Vector 1: precise injection via update()
vConsole.network.update('__proto__', { polluted: 'pwned' });
console.log({}.polluted); // "pwned"

// Vector 2: mass pollution via add()
vConsole.network.add({ id: '__proto__', url: 'http://example.com', method: 'GET', status: 200 });
console.log({}.url);    // "http://example.com/"
console.log({}.status); // 200
console.log({}.method); // "GET"