Some public-facing web pages may be taken offline temporarily as a precaution while security patches are applied, the office said in a statement.
Any individuals or organisations whose information was affected will be notified "as quickly as possible," it said.
The government did not identify the attackers or affected departments, or say whether information had been stolen.
Similar incidents had been detected by other organisations in Canada, the government said.
The government's statement did not link the activity to the European or British attacks.
The disclosure comes as AI-driven hacking has surged in recent weeks, multiplying the number of breaches and cyber incidents around the world, Reuters reported earlier.
AI models are increasingly being used to ferret out previously obscure vulnerabilities in widely used software and autonomously power cyber intrusions, developments that have already caused ripples of disruption across the web.
The Canadian Centre for Cyber Security said attackers are increasingly using automated and AI-enabled tools that can link and repeat stages of an attack across many targets, accelerating exploitation of known vulnerabilities.
"While many of the underlying techniques and vulnerabilities are well known, AI helps threat actors find and use them more quickly, giving organisations less time to respond," the statement said.