bhuh12 / vue-router-tab

Vue.js tab components, based on Vue Router.

Home Page:https://bhuh12.github.io/vue-router-tab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iframe功能存在xss漏洞

Kntt opened this issue · comments

Bug 描述

针对 bug 清晰简洁的描述。

问题重现

重现行为的步骤:

  1. Go to https://bhuh12.github.io/vue-router-tab/demo/#/iframe/iframe/data%3atext%2fhtml%3bbase64%2cPHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg%3d%3d/Vue%20Router/rt-icon-web
  2. 插入的iframe是data%3atext%2fhtml%3bbase64%2cPHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg%3d%3d,encode过的base64 '<script>alert(1)</script>'

预期行为

页面弹出altet

截图

如果可以,请添加屏幕截图以帮助解释您的问题。
image

这种场景是统一屏蔽掉 iframe 的 base64 src,还是转码 base64 后看是否包含 script 标签再处理?
正常 iframe 会有 base64 地址的需求吗?

没有这种需求, 会不会有人恶意的拼好链接 发给他人

那我直接屏蔽所有base64地址吧

那我直接屏蔽所有base64地址吧

应该是没问题, 现在是在主项目限制了,增加meta标签限制来源

v1.2.2 版本已修复