Submitted by rvierdiiev, also found by sashik_eth
Using setPosMode function owner of position can change its mode. When the function is called, then there are a lot of checks, like if current mode allows to decollateralize and if new mode allows to collateralize.
Also its checked, that all position collateral is used by the new mode. Its done for the pools and for the wLp tokens.
In order to be able to use wLp tokens as collateral, then wLp should be whitelisted. It is checked in several places in the code, like here. Its also possible that after some time wLp token will be blacklisted. In this case it should not be allowed to migrate blacklisted wLp token to the new mode, however there is no such check in the setPosMode function.
As result user can provide blacklisted collateral to the new mode.
I understand that borrowing factor for such collateral will be likely about 0, however if you would try to collateralize such token, then it will be denied, thus setMode function breaks this invariant.
Non whitelisted collateral can be moved to the new mode.
VsCode
Do not allow user to move blacklisted collateral to the new mode.
fez-init (INIT) confirmed and commented:
