Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2021-4272: 临时处理 xss · studygolang/studygolang@0fb30f9

A vulnerability classified as problematic has been found in studygolang. This affects an unknown part of the file static/js/topics.js. The manipulation of the argument contentHtml leads to cross site scripting. It is possible to initiate the attack remotely. The name of the patch is 0fb30f9640bd5fa0cae58922eac6c00bb1a94391. It is recommended to apply a patch to fix this issue. The identifier VDB-216477 was assigned to this vulnerability.

CVE
#xss#vulnerability#js

@@ -23,6 +23,24 @@

var markdownString = $(this).text();

var contentHtml = marked(markdownString);

// JS 处理,避免 XSS。最终还是改为服务端渲染更好

if (contentHtml.indexOf(‘<script’) != -1) {

contentHtml = contentHtml.replace(/<script/g, ‘<script’);

}

if (contentHtml.indexOf(‘<form’) != -1) {

contentHtml = contentHtml.replace(/<form/g, ‘<form’);

}

if (contentHtml.indexOf(‘<input’) != -1) {

contentHtml = contentHtml.replace(/<input/g, ‘<input’);

}

if (contentHtml.indexOf(‘<select’) != -1) {

contentHtml = contentHtml.replace(/<select/g, ‘<select’);

}

if (contentHtml.indexOf(‘<textarea’) != -1) {

contentHtml = contentHtml.replace(/<textarea/g, ‘<textarea’);

}

contentHtml = SG.replaceCodeChar(contentHtml);

$(this).html(contentHtml);

Related news

GHSA-gw62-c7w4-x449: studygolang vulnerable to cross-site scripting

A vulnerability classified as problematic has been found in studygolang. This affects an unknown part of the file static/js/topics.js. The manipulation of the argument contentHtml leads to cross site scripting. It is possible to initiate the attack remotely. The name of the patch is 0fb30f9640bd5fa0cae58922eac6c00bb1a94391. It is recommended to apply a patch to fix this issue. The identifier VDB-216477 was assigned to this vulnerability.

CVE: Latest News

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