Emergency services were called to a house in the Llanrumney area of the city just after 01:30 BST on Wednesday.
People in the house were able to put out the fire themselves, but two needed treatment by paramedics, fire officers said.
Fire investigation officers and police will examine the scene later.
An investigation is to be launched after liquid accelerant was poured through the letterbox of a Cardiff home and set on fire.