Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Fix decode-uri-component DoS (CVE-2026-45822) by dropping query-string

Đang mở
#11,380 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #11387 của @bipul724 — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
frontend, security

Hướng nghiên cứu

Start with the internal query-string uses in fetch.ts, useListParams, and useRecordFromLocation, then inspect how fetchUtils.queryParameters is exposed. Replace those uses with the proposed native URLSearchParams-based helper while checking the existing default output and CJS build constraints. Done means the vulnerable dependency tree is removed and query output remains byte-for-byte identical; also verify the impact of dropping the undocumented options argument.

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

Mô tả

Is your feature request related to a problem? Please describe.

ra-core depends on query-string@^7.1.3, which pulls [email protected], affected by GHSA-vcc3-ghjq-m6fr / CVE-2026-45822 (moderate DoS via malformed percent-encoded input, reachable through URL query parsing). The only patched release is 0.5.0.

Describe the solution you'd like

Remove query-string and replace its internal uses (stringify in fetch.ts, parse in useListParams / useRecordFromLocation) with a small native URLSearchParams-based helper. This drops decode-uri-component (and filter-obj, split-on-first, strict-uri-encode) from the install tree with no ESM/CJS problems, and default output stays byte-for-byte identical.

Describe alternatives you've considered

  • Bump query-string to 9.5.x: the only releases depending on patched decode-uri-component@^0.5.0, but query-string 8+ is ESM-only (type: module), while ra-core ships a CJS build (require → dist/index.cjs does require("query-string")). Breaking for CJS/Node/Jest consumers.
  • Override just decode-uri-component: wouldn't help consumers either. resolutions/overrides only apply to the project that declares them, so an entry in react-admin's repo would fix its own install but consumers would still resolve the vulnerable version. And it doesn't work mechanically anyway, since the patched version is ESM-only and can't be required by query-string@7.

Additional context

The native replacement would drop the optional, undocumented StringifyOptions second argument of fetchUtils.queryParameters (currently an alias for query-string's stringify). It isn't used with options anywhere in the repo and isn't documented, but it is technically a public API change.

Would you accept that as part of this security fix in a minor/patch release, or would you prefer to hold it for a major? Happy to open the PR either way.

Ngôn ngữ chính
TypeScript
Star
27k
Fork
5.5k
Merge trung bình
1 ngày 3 phút
Pull request đã merge (30 ngày)
32

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

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 marmelab/react-admin

Tất cả issue của marmelab/react-admin

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.