The right-back was part of the Dons squad which was stunned by Queen of the South in the 2008 William Hill Scottish Cup semi-final.
Jimmy Calderwood's side were overwhelming favourites to end their eight-year wait for a final appearance but slumped to a 4-3 defeat.
It was not the only humiliation inflicted on Foster during his Pittodrie days after Queen's Park, Dundee, Raith Rovers and East Fife all dished out further agony in knock-out clashes.
And he says Rangers could be embarrassed in the same way when they take on League Two minnows Albion at Ibrox in the Scottish Cup quarter-final if they are not ready for the fight.
He said: "I've been on the end of a few defeats to lower league teams.
"The one in 2008 with Aberdeen when we lost to Queen of the South in the semi-finals was one of the hardest to take.
"Those results can happen. Sometime you can just have an off-day. Against Queens, they were great and played us off the park, but we all had an off-day.
"They deservedly went through. It's very rare to have nine or 10 players having an off-day but that's what happened to us at Aberdeen.
"However, I know we will be well guarded against being complacent on Sunday. It's a cup game and both teams will be up for it.
"If Albion Rovers put us under pressure and we don't handle it, there is very chance that there could be a shock on the cards.
"But I'd like to think that we are professional enough and fully aware of the pitfalls to mean that won't be an issue."
The current Dons side are currently enjoying much more luck in the cup tournaments than the vintage Foster played with.
New Reds boss Derek McInnes hopes to land the club's first trophy in 19 years a week on Sunday when they face Inverness in the League Cup final.
But before that, they have a last-eight Scottish Cup clash with Dumbarton to negotiate.
And Foster would love to see both his current side and his former employers eventually meet in May's Celtic Park decider.
"It would be nice to get Aberdeen in the final," said the former Pittodrie skipper. "It's certainly something I've been looking at every time there's been a draw made.
"We've avoided them thus far but it would be nice to get them in the final.
"Once we are safely through on Sunday, if that happens, I will be watching the draw intensely."