England went ahead through Wayne Rooney and looked on course for a comprehensive victory, but Cahill's error allowed Brazil back in to the game after the break.
The usually dependable centre-back dribbled out of his own box, Brazil stole possession and the ball fell in to the path of Fred, who slotted the ball past Joe Hart.
As it happened, the mistake did not ultimately prove costly as Frank Lampard struck soon after to give the Three Lions a 2-1 triumph and their first win over Brazil in 23 years.
But the former Bolton man knows he cannot make too many errors like that in the future.
"That's the nature of my position," Cahill said.
"I thought I played well overall but if you make a mistake like that it's going to be costly. It was out of character from myself, but I will learn from it and that's great.
"I showed character to bounce back from it and the team showed character to forget about it and carry on.
"Thankfully Frank scored so it didn't spoil the lads' night.
"It did spoil my night slightly though."
Although it was only a friendly, Cahill thinks the victory over the five-time world champions will give Roy Hodgson's men a big confidence boost ahead of two vital qualifiers against San Marino and Montenegro next month.
He added: "It's fantastic. They are a difficult outfit to play against, but I thought we were dangerous, particularly in the second half, and I thought the result was deserved.
"It was important for us with the qualifiers coming up."
Cahill was full of praise for Chelsea and England team-mate Ashley Cole, who won his 100th cap against the Selecao.
"He is an inspiration," Cahill said.
"I have been plugging away for years to get in to the squad and he has got 100 caps now. He has been at the top of his game for 12 years. It's fantastic for him and I hope there will be many more to come for him."