Tries for the visitors came through halfback partners Matthew Hutcheon and Matthew Hurley, to compliment an impressive defensive effort from their side.
Bargoed's divisional rivals Ebbw Vale also won away at Principality Premiership opposition, triumphing 26-13 at Rodney Parade over local enemies Newport.
The Steelmen crossed for three tries through prop Ross Jones, winger Wes Cunliffe and scrum-half Gareth James. It was Cunliffe's score, less than a minute into the second half, which effectively sealed the match for Ebbw.
Neath won 23-11 away at Pontypool as another Premiership side exited the cup, with David Langdon's boot proving the difference between the two teams.
It was a far from free-scoring spectacle at Church Bank in another all-Premiership encounter as Pontypridd came away from Carmarthenshire with a 3-0 win over hosts Llandovery.
A 75th-minute Simon Humberstone penalty was the game's sole scoring play, although the match was nowhere near as dull as the scoreline might suggest, with both sides throwing everything at each other in full-blooded cup clash.
Carmarthen Quins progressed to round three after a 20-18 win in their all-Premiership tie with Bridgend.
Centre Alec Pickersgill and fly-half Gareth Morgan crossed for the Quins but visitors Bridgend fought back to take the lead with five minutes to go. Replacement hooker Arthur Ellis was among their scorers but a late penalty from full-back Chris Banfield gave Quins the victory.
Dan Crimmins scored twice as Cardiff ran in five tries at home to Glamorgan Wanderers. The Blue and Blacks were ahead 20-3 at half-time and extended their lead in the second-half as Joe Griffin and Matthew John added further tries.
Swansea joined Cardiff in the next round with a 36-22 win over One West side Tondu. The All Whites crossed for six tries, with Ryan Evans scoring twice. Tondu scored three tries themselves but were always behind.
Elsewhere, Bonymaen's winger Nathan Brooks turned in a remarkable individual performance, scoring a hat-trick as his side went down 35-26 at Llanelli. Two of Brooks' tries were 60-yard efforts.
Meanwhile, One West sides Ammanford, Bridgend Athletic and UWIC joined One East Beddau, Newbridge and Rumney in the third round, alongside Premiership outfits Cross Keys and Tonmawr.