server filename with control characters printed to terminal (`-J`)
注入与走私 / Improper Neutralization of Escape, Meta, or Control Sequences / #4130124
该报告还没有中文解读。
原文摘录
摘自原文(3017 字符中的一小部分)
Summary: With `-OJ`, curl takes the filename from the server's `Content-Disposition` header. `parse_filename()` in `src/tool_cb_hdr.c` does not remove control characters such as ESC (0x1b). When a warning prints that name, the escape sequences reach the terminal.
原文中的代码
import http.server
class H(http.server.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-Disposition',
'attachment; filename="ok\x1b[2J\x1b[31mPWNED.txt"'
.encode('latin-1', …默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 curl 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @gube-dev · 版权归作者与 curl 所有