The man was caught with 45 grams of marijuana and hashish in his cell at the Orbe penitentiary, 20 Minutes reported online on Thursday.
According to police, the inmate was selling the drugs to other prisoners “in need”, the newspaper reported.
He was recently fined 200 francs and the equivalent of 15 days of pay for consuming and trafficking narcotics in prison.
The incident occurred at the EPO, a penitentiary complex with a capacity to house 260 detainees in individual cells.
The complex consists of separate buildings to house nigh-risk and low-risk offenders.
It is not clear what offence the drug dealer was originally incarcerated for.
“The (drug) products were brought in by visitors or thrown in from the outside,” Sylvie Bula, chief of the Vaud penitentiary service, is quoted as saying by 20 Minutes.
“There was no trafficking on a large scale,” Bula insisted.
Certain amounts of illegal drugs can be hidden in the bodies of inmates, she indicated.
“Drugs are everywhere, in prison like in the outside world.”