Vermont senator Bernie Sanders has hit out at Donald Trump, taking to social media to call the president a "pathological liar".

The former presidential hopeful made the comment in a series of tweets, which followed attacks by Trump on the mainstream media and suggestions the press were the 'enemy' of the American people.

The president used his first solo press conference to hit out at the media, also continuing his accusations about 'fake news' in a series of social media posts.

Sanders appeared to use his tweets to issue a response on the subject, stating: "In Trump's view people should ignore all the news except what comes directly from him. That is what totalitarianism is all about.

"Good thing we have Donald Trump, a pathological liar, to tell us the 'truth'."

The senator also shared a link to Trump's social media post about the "fake" media – a claim the president has stepped up over the past week.

At his news conference, Trump lambasted the media, suggesting leaks involving news of his advisers having contact with Russia during the election was 'fake news'.

He acknowledged that the leaks were real but claimed their contents were not.

"The leaks are real, but the news is fake because so much of the news is fake," he said.

Bernie Sanders during senate committee
Senator Bernie Sanders hit out at Trump. Getty

He added: "The first thing I thought when I saw this was how does the press get this classified information? You know why, because it's an illegal process. And the press should be ashamed of themselves.

"What happens when I'm dealing with North Korea? What happens when I'm dealing with the Middle East? Are you folks going to be reporting all that?

"We are going to stop it. That's why it's a criminal penalty."

The president did not cease his attack on the media as he continued his press conference, adding: "Tomorrow they will say 'Donald Trump rants and raves about the press'. I'm not ranting and raving. I'm just telling you, you are dishonest people."