Author → stored XSS in wp-admin: unescaped sub-size filename from attachment metadata breaks out of the `src` attribute in `get_media_item()`
该报告还没有中文解读。
原文摘录
摘自原文(21739 字符中的一小部分)
`finalize_item()` stores the attacker-supplied `sub_sizes[].file` string verbatim into `_wp_attachment_metadata['sizes'][<name>]['file']` — no `sanitize_file_name()`, no `pattern`, no `sanitize_callback`.
原文中的代码
$metadata['sizes'] = $metadata['sizes'] ?? array(); $metadata['sizes'][ $image_size ] = array( 'width' => $sub_size['width'] ?? 0, 'height' => $sub_size['height'] ?? 0, 'file' => $sub_size['file'] ?? '', 'mime-type' => $sub_size['mime_type'] ?? '', …
默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 WordPress 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @jakubk · 版权归作者与 WordPress 所有