Manager Garry Monk felt Boro were unfortunate to lose, but accepts they are in the middle of a difficult spell.
The second-placed Bluebirds kept up the pressure on leaders Wolves as Joe Ralls’s 84th-minute penalty secured victory.
The Teessiders have failed to win any of their last five matches, and find themselves in the bottom half despite having started the season as the favourites for automatic promotion.
Boos rang around the Riverside at the final whistle, but Monk was keen to accentuate the positives even though Cardiff goalkeeper Neil Etheridge was only forced to make one save.
Monk said: “It’s clearly a frustrating period for us. We knew going into the game it wasn’t going to be one with a lot of chances because of the way Cardiff set up, so we knew we were going to have to show patience.
“We were in the ascendency and if anyone was going to win, it looked like us, so it was a really harsh result.
“We understand the fans’ frustration, but what’s very clear is that we stick together. It’s easy to lose focus on what the players have done really well, even today there were a lot of good things.
“We’re getting punished for errors, but we know the good things we’re doing will get us through.
“There were a lot of positives in how we controlled the game and forced them back and they settled into that defensive mode. We’re very close to getting to that situation where those things go for us. When we do get through this period, you’ll see a lot of positives.”
Middlesbrough: Randolph, Christie, Ayala, Gibson, Da Silva, Downing (Traore 78), Howson, Leadbitter, Braithwaite, Assombalonga, Fletcher (Bamford 67). Unused substitutes: Konstantopoulos, Friend, Clayton, Fry, Johnson.
Cardiff: Etheridge, Ecuele Manga, Morrison, Bamba, Peltier, Bryson, Ralls, Bennett, Mendez-Laing (Paterson 89), Ward (Bogle 90), Hoilett. Unused substitutes: Tomlin, Feeney, Halford, Damour, Murphy.
Referee: A Madley (West Yorkshire).