A page on the Istana website was compromised early Friday morning, shortly after a page on the Prime Minister's Office (PMO) website was also hacked.
In a statement at noon Friday, the Infocomm Development Authority (IDA) said the two incidents were due to a vulnerability known as "cross-site scripting", typically found in Web applications that allows hackers to bypass access controls.
"Both the PMO and Istana main websites are still working, and we will restore the compromised pages as soon as possible. The matter is under investigation," the IDA said in its statement.
"We will continue to strengthen all Government websites. This includes the checking and fixing of vulnerabilities and software patching. While this is in progress, visitors to Government websites may experience intermittent problems with access. This will be completed as soon as possible," the IDA said, while apologising for any inconvenience caused.
On Wednesday, Prime Minister Lee Hsien Loong issued a warning to hackers, saying that the authorities will "spare no effort" to track down those who threaten to attack the country's computer networks and bring them to justice.
It was his first comment since a person claiming to be from Anonymous last week threatened to hit out at Singapore's information technology infrastructure in a show of protest against new licensing rules for news websites.