Blurring Non-Uniform Areas

I have an image with arbitrary area (the boundary is shown in gray):

I would like to blur just the image within boundaries.

Ordinary blur causes the background proliferating to image and vice versa. This results in dark areas near boundaries of the image:

-

(filter(source & mask) / filter(mask)) & mask