The incident occurred at the Neapolitan prison of Secondigliano shortly before New Year's Eve.
A prisoner had been given permission to visit his family over Christmas outside the prison walls, according to a report in Italian daily Il Sole 24 Ore.
The prisoner then reentered the prison with several capsules filled with hashish resin in his stomach. Two police dogs, Igor and Caesar, reportedly identified the prisoner during a search of the prison before the inmate had time to distribute.
Secondigliano maximum security facility holds just over 1,300 prisoners and is situated in a part of the southern Italian city of Naples that has high crime rates.
The incarceration centre made headlines last month when the Ministry of Infrastructure and Transport announced that it would offer training and resources for a full scale car and lorry servicing business to open inside the prison walls.