Default AutomaticDecompression = All routes responses through the Brotli decoder affected by CVE-2026-111497
Đá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
- 35/100
Hướng nghiên cứu
Start in src/RestSharp/Options/RestClientOptions.cs and read the default for AutomaticDecompression, then check the proposed resolution in linked pull request #2419. Done means the .NET default uses GZip and Deflate without advertising or decoding Brotli, with the related documentation and changelog updated.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
RestClientOptions.AutomaticDecompression defaults to DecompressionMethods.All on .NET (src/RestSharp/Options/RestClientOptions.cs). Every RestClient built with default options therefore advertises Accept-Encoding: gzip, deflate, br and auto-decodes Content-Encoding: br responses through the Brotli decoder bundled in the .NET runtime.
That decoder is affected by CVE-2026-111497 (CVSS 4.0: 9.2): an out-of-bounds write in Google Brotli 1.0.3–1.2.0 triggered by a crafted stream, leading to memory disclosure, crash, or code execution in the decoding process. Public PoCs exist and code execution has been demonstrated against Node.js through the same "malicious server → auto-decompressed response" path.
HttpClientHandler/SocketsHttpHandler default to AutomaticDecompression = None, so plain HttpClient users are not exposed. RestSharp's default opts every user in without them ever mentioning Brotli. The bug is the runtime's, but as of 2026-10-24 no .NET servicing release contains the fix and no public dotnet/runtime branch has it (vendored Brotli is 1.1.0 on release/9.0–main, 1.0.9 on release/8.0; the upstream fix's BLOCK_SWITCH error code is absent on all of them), so users have no runtime update to apply.
To Reproduce
using var client = new RestClient("https://<your-request-bin>");
await client.ExecuteAsync(new RestRequest(""));
The captured request carries Accept-Encoding: gzip, deflate, br. Any server that answers with Content-Encoding: br has its body passed to the runtime's Brotli decoder before RestSharp hands it back. Same with new RestClient(new RestClientOptions(url)) — no decompression setting touched.
Expected behavior
A default RestClient should not advertise br or decode br responses while the runtime decoder is known-vulnerable and unpatched. With AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate the request carries Accept-Encoding: gzip, deflate and a br response is returned undecoded in RawBytes — the decoder is never reached. Servers that support Brotli also support gzip, so there is no functional loss.
Stack trace
None — the issue is reachability of vulnerable code, not an exception.
Desktop (please complete the following information):
- OS: macOS
- .NET version: .NET 10 (SDK 10.0.401); applies to all
#if NETtargets (net8.0/net9.0/net10.0). .NET Framework defaults toGZipand is not affected. - Version: 114.1.0 (NuGet latest) and
dev@ 466e5f8
Additional context
Only clients constructed from a URL, Uri or RestClientOptions are affected; a caller-supplied HttpClient/handler keeps the caller's setting. Exposure is proportional to how much control outsiders have over the URLs the client calls (third-party APIs, customer-supplied webhook endpoints, config-driven hosts).
Proposed resolution in #2419: change the .NET default to GZip | Deflate (Brotli opt-in) with docs and changelog, at least until patched runtimes ship.
References:
- Node.js advisory: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases
- GHSA-9v8h-qqgm-4m35: https://github.com/advisories/GHSA-9v8h-qqgm-4m35
- Upstream fix: https://github.com/google/brotli/commit/0ed4268a4401abcb4472096340477cf4af7d1a2b
- Imperva analysis: https://www.imperva.com/blog/node2shell-from-brotli-data-to-remote-code-execution/
- Ngôn ngữ chính
- C#
- Star
- 9.8k
- Fork
- 2.3k
- Merge trung bình
- 11 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của restsharp/RestSharp
-
RestClientOptions.UserAgent missing from requests with useClientFactory: trueCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
feature-request rfc
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
feature-request rfc
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
-
awaiting-feedback feature-request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Tất cả issue của restsharp/RestSharp
Issue tương tự
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dotnet/dotnet-api-docs#13210 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
aspnet-core/svc doc-enhancement mvc/subsvc Pri2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dotnet/AspNetCore.Docs#38016 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
HicServices/RDMP#2398 ·
-
[Android] Memory leak in MAUI Graphics text drawing and measurement during repeated renderingĐang mởarea-drawing platform/android t/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
dotnet/maui#39676 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày