Last season's top scorer Kenneth Zohore earned them victory with his fourth goal of the West Country programme after the break.
The Denmark Under-21 striker coolly netted from just inside the box after second-half substitute Lee Tomlin took a quick free-kick.
Cardiff continue their preparations away to Shrewsbury Town on Tuesday.
Cardiff City completed their pre-season trip to the South West with a 1-0 win over Plymouth Argyle at Home Park.