The attack happened just before 4 p.m. on Thursday when Bolsonaro, who has served in the lower house of Congress for almost 28 years, was being carried by supporters at a political rally in Juiz de Fora. A suspect was arrested.
Lula was convicted on charges of accepting a seaside apartment as a bribe and then lost an initial appeal.
Some of Mr Bolsonaro's past comments have caused uproar, including equating homosexuality with paedophilia, and saying a congresswoman was too ugly to be raped.
The Federal Police said in a statement that it had officers escorting Bolsonaro at the time of the knife attack and the "aggressor" was caught in the act. It is a surreal situation.
One of his campaign pledges has been to legalize the carrying of weapons in order to combat rising violent crime. The fact that he is now a victim himself plays into the hands of his supporters, who see this as a very important problem for Brazil to tackle.
Other candidates quickly denounced the stabbing.
How did the attack unfold?
Eduardo Bolsonaro said his father was stabbed in the abdomen. He is then lowered and quickly bundled into a auto.
"Unfortunately it was more serious than we hoped", tweeted his son Flavio Bolsonaro. His condition now seems stabilised.
But Flavio Bolsonaro, the candidate's son, said earlier on Friday outside the hospital where his father was that the attack was a political boost.
Former campaign adviser to Pres. Trump sentenced to 14 days in prison
Papadopoulos had initially claimed this was before he joined the campaign, though he later confirmed it was once he was on staff. But the attorney said "the president of the United States hindered this investigation more than Papadopoulos ever could".
Alibaba co-founder Jack Ma to retire
Over the course of his tenure at Alibaba , Ma became China's richest man, earning a net worth of more than $40 billion. Initially developed as a business-to-business e-commerce solution.
Ariana Grande Disables Instagram Comments Following Hateful Comments About Mac Miller's Death
On Thursday night Mac posted a video of a record player with his song "So it Goes" playing in the background. We join all of his fans across the globe in extending our thoughts and prayers to his family and friends".
His doctor said he will be in intensive care for at least seven days, and will have to return for more surgery in coming months.
He has since been filmed in his hospital bed, making a hoarse statement. He had "never hurt anyone", he said.
"It was necessary for us to not just treat one point (of entry) but a number of them inside the small intestine", Dr Luiz Henrique said at a news conference.
De Oliveira was beaten badly by Bolsonaro supporters after the attack.
Fernando Haddad, who will likely be the leftist Workers Party presidential candidate, said the stabbing was a "shame" and a "horror".
"No matter what you think about him, he did not deserve this", said Mauro Rodrigues, owner of a construction business who went to the hospital to support Bolsonaro.
Environmentalist candidate Marina Silva said the attack must be investigated and the perpetrators punished.
Brazil's stocks and the currency rose as investors saw potential sympathy votes for Bolsonaro as he recovers and some damage to his left-wing contenders. He was being to another hospital in Sao Paulo.
Temer has already dodged two attempts to impeach him in the past year, and has the lowest popularity rating of any president in Brazilian history. However, despite his seemingly high popularity, Bolsonaro have so far failed to form any alliance with any major political forces in Brazil so far.
After more than four years of revelations of widespread political corruption, anger is running high.