Stored Cross-Site Scripting: HTML Context (Nothing Encoded)
嗯,用户让我用中文总结一篇文章,控制在100字以内,而且不需要特定的开头。首先,我得仔细阅读文章内容。看起来这篇文章讲的是Stored XSS漏洞,特别是在博客的评论功能中。 文章提到恶意输入被保存在服务器上,每次用户加载受影响页面时都会执行。作者Aditya Bhatt用了BurpSuite来测试这个漏洞。攻击者可以通过提交包含JavaScript的评论来存储和执行payload,比如弹出一个警告框。 我需要确保总结涵盖关键点:Stored XSS是什么,漏洞的位置(博客评论),没有过滤或编码,以及如何利用这个漏洞。同时要控制在100字以内,语言要简洁明了。 可能的结构是先点明主题,然后说明漏洞的位置和原因,最后描述攻击过程和结果。这样既全面又符合字数要求。 现在开始组织语言:“文章介绍了Stored XSS漏洞及其利用方法。通过在未过滤的博客评论中注入JavaScript代码(如<script>alert(1)</script>),攻击者可使脚本存储于服务器并在用户访问页面时执行。” 这样刚好在100字左右,并且涵盖了所有关键点。 </think> 文章介绍了Stored XSS漏洞及其利用方法。通过在未过滤的博客评论中注入JavaScript代码(如`<script>alert(1)</script>`),攻击者可使脚本存储于服务器并在用户访问页面时执行。 2025-12-13 07:54:3 Author: infosecwriteups.com(查看原文) 阅读量:8 收藏

Stored XSS occurs when malicious input is saved on the server and executed every time a user loads the affected page.

Aditya Bhatt

Write-Up by Aditya Bhatt | Stored XSS | HTML Injection | BurpSuite

This PortSwigger lab contains a stored XSS vulnerability inside the blog’s comment functionality. Since nothing is encoded or sanitized, any JavaScript inside the comment body gets stored on the server and executed whenever any user views the blog post.

We’ll craft a payload, store it via the comment form, return to the main blog page, and watch the JavaScript execute.

Free Article Link
My GitHub Repo
Lab Link

Press enter or click to view image in full size

🧪 TL;DR

  • Comment fields reflect input directly in HTML context
  • No filtering / sanitization / encoding
  • Payload gets stored + executed on page load
  • Final payload:
<script>alert(1)</script>
  • Submit comment → Go back to blog → Alert fires → Lab Solved 🎉

🌐 Brief Intro


文章来源: https://infosecwriteups.com/stored-cross-site-scripting-html-context-nothing-encoded-1f63a3899cb2?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh