Leo Cullen’s men remain top of the table despite coming under fierce pressure from a Cardiff side who thrived on turnovers, charging out of their own half for all three of their tries.
Dan Leavy and Luke McGrath scored a try apiece as Leinster led 14-7 at half-time, the Blues hitting back with a well-worked Tomos Williams effort.
Cardiff continued to capitalise on Leinster errors, a slick counter-attack putting scrum-half Williams over for a levelling 47th-minute try before Ross Byrne’s penalty made it 17-14.
A breakaway score from Cardiff replacement Sion Bennett had Leinster’s two-year unbeaten Pro12 run at the RDS under serious threat – however second row Molony’s five-pointer from a maul proved to be the match winner.
Ronan O’Mahony touched down twice as Munster strengthened their grip on a top-four spot with a 50-14 victory at bottom club Zebre. Wing O’Mahony scored in either half to become the competition’s top try-scorer with nine.
Niall Scannell, Tommy O’Donnell and Rory Scannell were also on the scoresheet for the Irish province, while James Cronin added a brace.