Prototype Pollution in network.model.ts

Đang mở Phù hợp với người mới
#734 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@dvd233 đang làm issue này rồi.

Từ ngày 13/9/2026.

  • #739 của @dvd233 — đang mở
  • #748 của @lnuxe — đã đóng, không merge

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
security

Hướng nghiên cứu

Bắt đầu với updateRequest trong src/network/network.model.ts, sau đó lần theo các điểm vào vConsole.network.update và vConsole.network.add trong src/network/network.exporter.ts. So sánh các bước kiểm tra key hiện có trong src/core/core.ts. Được xem là hoàn thành khi các input proto, constructor và prototype được báo cáo không còn sửa đổi Object.prototype thông qua cả hai public API.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

// 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"
Ngôn ngữ chính
TypeScript
Star
17.5k
Fork
3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Tencent/vConsole

Tất cả issue của Tencent/vConsole

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.