Site A will be having an
<img> tag with
src= attribute as an absolute URL pointing to site B.
Site B will return an image response, and in that response a cookie will be set (cookie of Site B's domain).
This is being done because safari browser blocks cookies set from iframe sites. By doing so the iframe site here (site b) will set cookie outside iframe and from there onwards can set cookie even inside iframe.
I'm concerned with any vulnerability that might arise out of this scenario (if any) as I am not really aware of such security issues. Can someone please point me to the right source if this is a potential vulnerability?