Correct. One needs to seal the sides of MDF before painting.
Panic not, all can be solved.
Let me find a thread where I discussed exactly this.
Edit--->
Here:
https://www.woodworkforums.com/f308/...88#post2083490
Here:
https://www.woodworkforums.com/f9/se...93#post2100201
A video:
YouTube
In the second link, I talk of "car bog". This is a filler used by panel repair guys and works the absolute best. Next best is Gyprock (dry wall) filling plaster. The extra smooth finishing one in the red tin is the best. Does a great job.
Ask any more quesitons. Many here can help :)