Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2022-4348: XSS问题 · Issue #I5IRC8 · 若依/RuoYi-Cloud - Gitee.com

A vulnerability was found in y_project RuoYi-Cloud. It has been rated as problematic. Affected by this issue is some unknown functionality of the component JSON Handler. The manipulation leads to cross site scripting. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-215108.

CVE
#xss#vulnerability#js#git

攻击脚本:

处理前:
<img src=1 onerror=alert(/x/)>
处理后:(这是一个错误的JSON)
<img src=\"1" />

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment
原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:
将HTMLFilter中的390行

params.append(' ').append(paramName).append("=\\\"").append(paramValue).append("\"");

改成

params.append(' ').append(paramName).append("=\\\"").append(paramValue).append("\\\"");

评论 (1)

原值

攻击脚本:<img src=1 onerror=alert(/x/)>

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

改成

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

新值

攻击脚本:"<img src=1 onerror=alert(/x/)>"

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

改成

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

原值

攻击脚本:"<img src=1 onerror=alert(/x/)>"

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

改成

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

新值

攻击脚本:

```

<img src=1 onerror=alert(/x/)>

```

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

改成

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

原值

攻击脚本:

```

<img src=1 onerror=alert(/x/)>

```

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

改成

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

新值

攻击脚本:

```

<img src=1 onerror=alert(/x/)>

```

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

```

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

```

改成

```

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

```

原值

攻击脚本:

```

<img src=1 onerror=alert(/x/)>

```

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

```

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

```

改成

```

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

```

新值

攻击脚本:

```

处理前:

<img src=1 onerror=alert(/x/)>

处理后:(这是一个错误的JSON)

<img src=\"1" />

```

报错:JSON parse error: Unexpected character (‘/‘ (code 47)): maybe a (non-standard) comment

原因:经过HTML对标签的参数进行处理时,没有处理好结束符

处理方案:

将HTMLFilter中的390行

```

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\"”);

```

改成

```

params.append(' ').append(paramName).append(“=\\\"”).append(paramValue).append(“\\\"”);

```

误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

若依 将任务状态从 待办的 修改为已完成

登录 后才可以发表评论

Related news

GHSA-vp22-232w-h9x8: RuoYi-Cloud Cross-site Scripting vulnerability

A vulnerability was found in y_project RuoYi-Cloud. It has been rated as problematic. Affected by this issue is some unknown functionality of the component JSON Handler. The manipulation leads to cross site scripting. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-215108. A patch for this issue is available at https://gitee.com/y_project/RuoYi-Cloud/pulls/224.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907