Open this photo in gallery:

A flag flies in front of the Peace Tower on Parliament Hill. The cyberattack was first made public late Monday night by the Office of the Chief Information Officer.Chris Wattie/Reuters

Hackers using artificial intelligence breached the Canadian military’s recruitment portal and accessed thousands of documents from the federal export control system, but the full scope of the attack remains unclear as security officials work around the clock to patch the gaps.

Foreign Affairs Minister Anita Anand said electronic intruders gained access to approximately 125,000 documents from her ministry’s New Export Controls Online portal, which allows exporters to submit applications online for export permits, including for strategic and military goods.

She said these documents contained information on 4,600 individuals and organizations.

“Global Affairs Canada directly contacted all affected individuals and organizations to notify them of the data breach,” Ms. Anand said in a statement.

She added that she would be discussing the issue with fellow foreign ministers from other North Atlantic Treaty Organization member countries on Wednesday.

“We will continue to provide more information to Canadians as it becomes available,” Ms. Anand said.

Open this photo in gallery:

National Defence Minister David McGuinty told reporters on Tuesday that the government views the attack as part of a series of similar incidents in the Western world.Adrian Wyld/The Canadian Press

Defence Minister David McGuinty said he couldn’t disclose how many government agencies were affected by the attack, as officials continued to deal with what he called an “immediate situation.”

When asked whether he thought a foreign state was responsible, he said the government is looking at it as one of a series of similar incidents in the Western world in recent weeks.

“The extent to which AI is a deployable asset for both positive and negative purposes is becoming clear,” Mr. McGuinty said Tuesday.

The incident was first made public late Monday night by the Office of the Chief Information Officer.

It said in a statement that over the past several weeks, the government has detected unauthorized activity within its networks that appears to be the result of malicious cyber threat actors using AI-enabled tools.

“Where the government determines that individuals’ or organizations’ information has been affected, the responsible department will notify them as quickly as possible,” the statement said.

Mr. McGuinty said a Department of National Defence website related to recruitment was among the affected sites.

Ms. Anand had previously disclosed that the export controls breach was identified on Nov. 25, and services were fully restored on Nov. 28.

Xi wants Canadian natural gas to fuel AI race with U.S., Energy Minister says

In recent weeks, hackers have targeted governments and organizations around the world with AI-enabled tools that allow them to automate cyberattacks on an industrial scale.

British Prime Minister Andy Burnham has said his country’s Department for Work and ​Pensions was hit last week with what appears to be an AI-enabled cyberattack. And Japan has been so severely targeted by hackers in recent weeks that government officials have declared “a state of emergency in cyberspace.”

“We see a massive rise in the amount of hacks,” said Jaya Baloo, chief information security officer of Toronto-based AI company Cohere, adding that incident response teams have been so slammed they’ve had to turn away customers. “It is really, really bad right now.”

Prime Minister Mark Carney said such attacks will become more prevalent.

“This type of threat to our national security, to our security, is only going to increase because of the developments in AI. It’s something that we’re working on, of course, internally within Canada across agencies,” Mr. Carney said Tuesday, adding that the government is taking steps to tighten its defences.

Last month, the federal government issued new direction to its departments on cybersecurity readiness in the context of recent developments in what’s known as frontier artificial intelligence technology, the most advanced form of AI.

“The rapid pace of frontier AI development means cyber risk assumptions can become outdated in months, not years, requiring action now to be prepared to adapt and withstand evolving threats,” the security policy note stated.

Hackers armed with AI have targeted the private sector as well. BCE Inc.’s Bell Canada recently disclosed that an “agentic threat actor” accessed its systems on Nov. 17 and stole data belonging to residential internet and mobile-phone customers, as well as enterprise clients.

David Shipley, chief executive officer of cybersecurity software firm Beauceron Security Inc., said automated, AI-enabled hacking tools are dramatically amplifying the speed and scale at which threat actors are able to penetrate systems.

OSC looks to keep one step ahead as pace of financial threats, innovations ramps up

One example is ARTEX, an agentic system used for penetration testing, in which a cybersecurity expert attempts to find and exploit vulnerabilities in a computer system for defensive purposes.

“ARTEX is to criminal groups what a power saw is to a carpenter,” Mr. Shipley said, adding, “It’s going to be months of this, if not years.”

Sami Khoury, the former head of the Canadian Centre for Cyber Security, said AI is enabling bad actors to uncover vulnerabilities in networks at “lightning speed,” leaving organizations with a deluge of patches to deploy. Implementing those patches can carry risks as well.

“I wouldn’t necessarily see a network coming down as a malicious activity. It could be the network coming down because we applied some patch that did not go right,” he said.

Some Canadian government websites were taken offline in October after the discovery of critical security vulnerabilities affecting PHP, a widely used open-source programming language. Those flaws were identified by security researchers using AI technology, and some sites were taken down until patches could be applied.

Mark Daley, Western University’s chief AI officer, said consumers should become accustomed to the possibility of digital services going dark for several days or even a week at a time.

“We’re used to systems being available sort of always on demand,” Mr. Daley said. “In the new cybersecurity landscape, it may be that systems are not available when you’d like them to be, and so we’ll just have to learn to cope with that level of uncertainty.”

With a report from Mercedes Stephenson