The shared wishlist add-to-cart endpoint authorizes access with a public sharing_code, but loads the acted-on wishlist item by a separate global wishlist_item_id and never verifies that the item belongs to the shared wishlist referenced by that code.
This lets an attacker use:
to import victim item B into the attacker's cart through the shared wishlist flow for wishlist A.
Because the victim item's stored buyRequest is reused during cart import, the victim's private custom-option data is copied into the attacker's quote. If the product uses a file custom option, this can be elevated to cross-user file disclosure because the imported file metadata is preserved and the download endpoint is not ownership-bound.
In app/code/core/Mage/Wishlist/controllers/SharedController.php, the shared flow does:
$item = Mage::getModel('wishlist/item')->load($itemId);
$wishlist = Mage::getModel('wishlist/wishlist')->loadByCode($code);
...
$item->addToCart($cart);
Relevant lines:
SharedController.php:86 loads the wishlist item by global IDSharedController.php:87 loads the wishlist by shared codeSharedController.php:99 imports the item into cartThere is no check that:
$item->getWishlistId() == $wishlist->getId()
The safe owner flow in app/code/core/Mage/Wishlist/controllers/IndexController.php:521-528 does preserve this binding by deriving the wishlist from item->getWishlistId().
The imported item keeps its original buyRequest because app/code/core/Mage/Wishlist/Model/Item.php:370-372 passes that stored request directly into:
20.17.0Exploitability
AV:NAC:LAT:NPR:LUI:NVulnerable System
VC:LVI:LVA:NSubsequent System
SC:NSI:NSA:N5.3/CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N