"The system is completely vulnerable," he told some 40 diplomats invited to his residence in an unprecedented briefing three months before a general election.
Bolsonaro gave no evidence of fraud, but said a hacker got inside the electronic voting system during the election he won in 2018 - an incident police concluded had not compromised the result in any way.
Bolsonaro told the envoys the Brazilian military should be called in to help secure transparency in the October 2 election.
He has pushed electoral authorities to accept a parallel vote count to be carried out by the armed forces. They have ruled that out.
Diplomats attending included envoys of the United States, the European Union, France, Spain and Portugal. Neighbour Argentina, whose president is a leftist, was not invited.
"We knew what he was going to say, that was no surprise. But it is quite unusual to convene the diplomatic community to talk about a domestic issue," one diplomat who attended told Reuters.
Opposition leaders called for an investigation of alleged electoral crimes committed by Bolsonaro, for his attacks on a system that has resulted in his election for three decades - as a congressman then as president - and for using public television to broadcast his views.
US officials have urged Brazilians to trust their voting system and said Bolsonaro should stop casting doubt on the electronic ballot.
Bolsonaro, a far-right nationalist who has said he modelled his presidency on that of Donald Trump, has echoed the former US leader's baseless allegations of fraud in the 2020 election.
He has repeatedly questioned Brazil's electronic voting machines, arguing without proof they are susceptible to fraud, which has raised fears he might refuse to concede defeat, as Trump did in 2020.
His attempts to discredit Brazil's electoral system, which has been used since 1996 with no evidence of irregularities, has led his opponents to suspect Bolsonaro may refuse to accept a possible victory by leftist former President Luiz Inacio Lula da Silva, who is leading by double digits in opinion polls.