The email linked to Donald Trump's Twitter account was hastily reset on Thursday after it emerged that the president's handle was vulnerable to sophisticated hackers because it was being secured using a private Gmail account.

That meant any capable hackers could have potentially hijacked the Twitter account by breaching safeguards used by ordinary citizens, setting up the potential for someone wreaking havoc in the stock markets as well as igniting a national security disaster, according to The Intercept.

The vulnerability of Trump's security settings was demonstrated online by @WauchulaGhost, a Twitter user and hacker.

@WauchulaGhost found that Trump's Twitter account is set to send password reset requests to a personal Gmail account that most likely belongs to his top social media aide, Dan Scavino.

Scroll down for video

President Donald Trump (above) deplanes from Air Force One in Philadelphia on Thursday. Trump's Twitter account may be vulnerable to hacking, according to a Twitter user with a history of breaching accounts

Though the account is partially redacted, savvy tech users could deduce the other letters of the email address.

That means that hackers would only need to breach Scavino's account by using spearphishing attacks, malware, or similar methods used to break in to the accounts of the Democratic National Committee and Hillary Clinton aide John Podesta, according to The Intercept.

@WauchulaGhost tried to warn the White House of the lax security settings, according to CNN.

The hacker found that Trump, Vice President Mike Pence, and First Lady Melania Trump were using their Twitter accounts without activating necessary security precautions that could be turned on through their settings.

Trump's Twitter account is tied to a personal Gmail account believed to belong to one of his aides, Dan Scavino. That means if a sophisticated hacker breaks into Scavino's Gmail, he or she could potentially change Trump's Twitter password and lock him out of his own account

@WauchulaGhost found that the Trumps and Pence did not activate the setting that requires Twitter to use their Gmail accounts or phone numbers whenever there is a request to reset their passwords.

When @WauchulaGhost clicked on 'forgot password' and typed in the Twitter handles @FLOTUS, @POTUS, or @VP, the next screen that came up said 'We found the following information associated with your account.'

The next item that appeared was a partially redacted email address to which the password recovery link is set.

It was learned that White House Press Secretary Sean Spicer has also tied his Twitter account to a personal Gmail address.

'All I have to do is guess the email. Which I have been rather good at doing,' WauchulaGhost told CNNTech via Twitter DM.

'Then verify the email exists. At that point take the email account, reset Twitter password, boom....I own the Pres. Not saying I'm going to..haha. But it's rather easy for some.'

A hacker known as @WauchulaGhost tried to warn Trump (above) of the lax security settings on his Twitter account

Trump has used the Twitter account as the means by which he communicates to the masses.

Since his inauguration as president on Friday, he has also posted messages on Twitter that appear to signal possible policy directions that his administration will take in the next four years.

Given Trump's heavy reliance on Twitter, the fact that he has used a Gmail account to protect his password to Twitter could create a scenario in which the president is locked out of his own Twitter account by savvy hackers.

Trump's tweets have driven news coverage, sent stock prices fluctuating, and elicited reactions in world capitals.

It was later learned that White House Press Secretary Sean Spicer also tied his Twitter handle to a private Gmail account, making it vulnerable to potential hacking

That means Trump's Twitter account would be an attractive target for hackers who want to either make significant sums of money by sending the stock price of a company soaring with one tweet or ignite a potential war, according to BuzzFeed.

Significantly, The Intercept reported that the email required to reset Trump's Twitter account was changed from a personal Gmail account to what appears to be a White House address.

During the presidential campaign, Trump had criticized his Democratic opponent, Hillary Clinton, for her use of a private email server when she was secretary of state during Barack Obama's first term in office.