The home side made a blistering start with Richard Smith scoring after eight minutes in the Welsh capital.
However, despite dominating territory and possession for long spells, the CBPS found themselves 15-5 down at the break after a quick-fire brace of tries from visiting wing Jack Arnott.
An early score in the second period from Aaron Carpenter settled the game and a try from replacement Lewis Jones failed to spark a late comeback as CBPS were left without a win from three games while the Pirates returned to the Pool 4 summit.
The teams meet again next weekend in Cornwall with CBPS knowing only a victory will be good enough as they look to win their final three games in the pool stages.
A bright start from CBPS saw them retain possession and break through when lock Chris Dicomidis raced over the whitewash only for play to be pulled back for a forward pass in the build-up.
The home side were playing some incisive rugby and scored the game’s opening try on eight minutes when wing Smith picked himself up after the initial tackle to bundle over in the corner.
Pirates responded inside five minutes when centre Tom Riley took advantage of a defensive mistake to break in midfield and when play was recycled a clever kick in behind from Laurence May was dotted down by the alert Arnott.
The winger doubled his tally three minutes later when another kick in behind, this time by scrum half Townsend, exploited more space for Arnott to slide in under the posts for a 12-5 lead.
Will Rees-Hole supported James Sheekey as he exploded off the back of a scrum before Aled Summerhill tore past men but an overlap went begging. Moments later Miles Normandale, Jevon Groves and Sheekey crunched up the middle but the ball was lost in the tackle.
CBPS dominated territory for much of the first half but failed to turn possession into points and were made to pay moments after Arnott saw a drop goal fall short as May slotted a penalty for a 15-5 lead at the break.
A bright and positive start to the second half saw all-action wing Smith hustle up close before Groves and Callum Hall both rattled up to the whitewash for CBPS to no avail.
And, to run salt in the wound, the visitors then went up the other end and scored a third try, this time from a driving lineout, as Canadian international Carpenter was shunted over and May added the difficult conversion.
A backline reshuffle, as Jones came on and Garyn Smith moved to centre, clicked immediately as the pair combined to send the scrum half over from close range to cut the lead to 22-10.
CBPS kept coming with Rhys Shellard making one blistering break while Tomos Williams was elusive around the fringes.
But there was to be no heroics of the Cardiff Blues team in Europe on Friday night as Cornish Pirates held out to claim the victory.
08m Smith t 5-0
13m Arnott t 5-5
16m Arnott t May c 5-12
39m May p 5-15
46m Carpenter t May c 5-22
54m Jones t 10-22
Cardiff Blues Premiership Select: 15 Aled Summerhill (Hall 27), 14 Richard Smith, 13 Tom Isaacs, 12 Will Rees-Hole (Jones 53), 11 Owen Lane (G Smith 27), 10 James Thomas, 9 Tomos Williams; 1Bradley Thyer (Davies 60), 2 Scott Andrews, 3 Dillon Lewis (James 40), 4 Miles Normandale (White 73), 5 Chris Dicomidis, 6 Jevon Groves, 7 Rhys Shellard, 8 James Sheekey
Replacements: 16 Thomas Davies, 17 Ashleigh James, 18 Joe Jones, 19 Nick White, 20 Garyn Smith, 21 Callum Hall, 22 Lewis Jones