{"id":116,"date":"2023-06-24T12:23:00","date_gmt":"2023-06-24T05:23:00","guid":{"rendered":"https:\/\/n45ht.or.id\/blog\/?p=116"},"modified":"2024-12-14T12:30:16","modified_gmt":"2024-12-14T05:30:16","slug":"stored-xss-on-chess24com","status":"publish","type":"post","link":"https:\/\/n45ht.or.id\/blog\/stored-xss-on-chess24com\/","title":{"rendered":"Stored XSS on Chess24.com"},"content":{"rendered":"\n<p>I recently registered on <strong>Chess24.com<\/strong> and, after playing a few games, decided to conduct a quick security analysis on the website. I focused on the profile settings page to test for potential vulnerabilities.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">XSS Payload Injection<\/h4>\n\n\n\n<p>Without wasting much time, I tested a common <strong>XSS payload<\/strong> by adding it directly to my profile settings page.<\/p>\n\n\n\n<p><strong>Injected Payload:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"HTML\" class=\"language-HTML\">https:\/\/site.com\/?\"\/onmouseover=\"alert(1)<\/code><\/pre>\n\n\n\n<p>This was my first attempt at injecting the payload into the URL.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"323\" src=\"https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com2.png\" alt=\"\" class=\"wp-image-117\" style=\"width:481px;height:auto\" srcset=\"https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com2.png 792w, https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com2-300x122.png 300w, https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com2-768x313.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n\n\n\n<p>After saving the XSS payload in my profile settings, I checked the source code of the page. The injected payload was reflected in the HTML source as follows:<\/p>\n\n\n\n<p><strong>Source Code (After Saving):<\/strong><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;a href=&quot;https:\/\/site.com\/?&quot;\/onmouseover=&quot;alert(1)&quot;&gt;https:\/\/site.com\/?&quot;\/onmouseover=&quot;alert(1)&lt;\/a&gt;\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">&lt;a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">href<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/site.com\/?<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9\">\/onmouseover=&quot;alert(1)&quot;<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #D8DEE9FF\">https:\/\/site.com\/?&quot;\/onmouseover=&quot;alert(1)<\/span><span style=\"color: #81A1C1\">&lt;\/a&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This indicated that the website was not properly sanitizing or escaping user inputs, making it vulnerable to <strong>stored XSS<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"131\" src=\"https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com3.png\" alt=\"\" class=\"wp-image-118\" style=\"width:516px;height:auto\" srcset=\"https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com3.png 604w, https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com3-300x65.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Stored XSS Triggered<\/h4>\n\n\n\n<p>As expected, after visiting the page where the payload was stored, I was able to trigger the <strong>stored XSS<\/strong>. The payload was executed successfully, showing an alert box.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"447\" height=\"251\" src=\"https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com1.png\" alt=\"\" class=\"wp-image-119\" srcset=\"https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com1.png 447w, https:\/\/n45ht.or.id\/blog\/wp-content\/uploads\/2024\/12\/chess24com1-300x168.png 300w\" sizes=\"auto, (max-width: 447px) 100vw, 447px\" \/><\/figure>\n\n\n\n<p><strong>#HappyHacking<\/strong><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently registered on Chess24.com and, after playing a few games, decided to conduct a quick security analysis on the website. I focused on the profile settings page to test for potential vulnerabilities. XSS Payload Injection Without wasting much time, I tested a common XSS payload by adding it directly to my profile settings page. [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":120,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[23,9,8],"class_list":["post-116","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-research","tag-bug-bounty","tag-cross-site-scripting","tag-xss"],"_links":{"self":[{"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":1,"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/posts\/116\/revisions\/121"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/media\/120"}],"wp:attachment":[{"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/n45ht.or.id\/blog\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}