The source said that Bonnar tested positive for drostanolone, an anabolic steroid. Herman tested positive for marijuana metabolites.
UFC 153 took place in Rio de Janeiro on Oct. 13.
The failed postfight drug test was Bonnar's second. He tested positive for boldenone after a unanimous decision loss to Forrest Griffin at UFC 62 in August 2006.
Griffin defeated Bonnar by unanimous decision in April 2005, during "The Ultimate Fighter" Season 1 finale. That fight is often credited with being most responsible for attracting casual fight fans to mixed martial arts.
Marc Ratner, the UFC vice president of regulatory affairs, confirmed to ESPN.com that two fighters did fail their 153 postfight drug tests. But he would not say whether Bonnar and Herman were those fighters.
"When we go to these different countries, in order to grow the sport, without athletic commissions supervising, we self-regulate," Ratner said. "That's because of the experience we have in our company with regulators.
"There were 12 fights (at UFC 153) and we tested all 24 fighters for performance-enhancing drugs as well as recreational street drugs. Twenty-two fighters tested negative and two fighters tested positive."
Bonnar suffered a first-round TKO to middleweight champion Anderson Silva in the main event. They competed at light heavyweight.
A little more than two weeks after the loss, Bonnar, 35, announced his retirement from mixed martial arts. He finished his career with a record of 15-8.
Herman was submitted via armbar in the second round by Antonio Rodrigo Nogueira. It was the first time in his professional career that Herman (21-5) had been submitted.
The setback to Nogueira, a former UFC interim heavyweight titleholder, was Herman's third in a row.