Latest

Cybersecurity

Microsoft Azure APIM suffers a security flaw with keys left exposed

Microsoft confirms that a flaw in Azure API Management Classic exposed secrets and subscription keys, with attacks linked to Norwegian energy companies.

Translated from Spanish by an automated system. The Spanish original prevails. Read the Spanish original

Microsoft Azure APIM suffers a security flaw with keys left exposed
Microsoft Azure APIM suffers a security flaw with keys left exposed

On November 18, Microsoft identified a flaw in the Classic tiers of Azure API Management that allowed a third party to access management functions and the secrets stored in the service. The following day it deployed a global mitigation and sent a security advisory to customers with an identifier worth saving: MZK9-GH0. The core warning is uncomfortable: the fix closes the door, but it does not invalidate the credentials someone may have copied beforehand.

Azure API Management is the component that publishes, protects and monitors the programming interfaces that connect applications and data. Whoever controls that layer does not need to break into every server: they obtain the keys that open the services behind it. That is why the incident matters more than its technical name suggests, and why Norwegian authorities are investigating attacks on the energy sector that point to this same flaw.

The advisory reached customers through the service health channel, not through a press release or a post on the corporate blog. The detail is not minor: the information circulated for hours on administrators' forums before a broader explanation was published, and early versions attributed the suspicious activity to credentials leaked by customers themselves.

The haul collected

The inventory Microsoft acknowledges as potentially exposed has five items. The first is the secrets stored in the service's named values. The second and third are the client secrets belonging to identity providers and to OpenID Connect providers. The fourth is subscription keys, and the fifth is the tokens used to call the direct management interfaces.

Each of those items opens a different door. A subscription key allows an API to be consumed and, if there are no limits, a customer's quota to be exhausted. An identity provider secret may allow tokens to be issued with an application's permissions. A direct management token gives access to the service's own configuration, and from there to the systems that hang off it.

Microsoft links the exposure to configurations that did not follow its network security guidance or that stored secrets directly in APIM instead of referencing them from Azure Key Vault. It is an elegant way of saying there were two problems: a vulnerability in the service and a widespread habit among customers that amplified it.

The mitigation does not rotate your keys

The advisory is explicit on the point most often overlooked. The remediation blocks the access path to the management plane that allowed administrative operations, including secret management, but it does not automatically invalidate credentials that may have been accessed before the fix.

The practical consequence is an outstanding task for every affected customer. Secrets stored in APIM must be rotated, the activity of the systems those credentials give access to must be reviewed, and logs must be searched for signs of anomalous use. None of those three tasks is automatic and none is resolved by a confirmation email.

Researcher Anders Kristiansen added a nuance that widens the problem. A credential stolen in APIM can be used directly against the service it protects, outside the platform, so reviewing API Management logs is not enough if the attacker jumped to the backend. What they can reach depends on the secret's permissions and on whether it is still valid.

Norway saw the trail before Redmond

The Norwegian national security authority published its own advisory on Azure APIM and placed the origin of the discovery in the country's energy sector. The actor, unidentified, was seeking access tokens, secrets and named values stored in APIM, and the agency warns that organizations in other countries and sectors have also been affected.

Equinor disclosed an ongoing cyberattack on November 17, a day before Microsoft identified the flaw in its service. It later reported that it had stopped the attack and had no indications of data theft or alteration. Skagerak Energi reported an attempt with no impact on its operations and no evidence of information compromise.

The Norwegian agency goes further than Microsoft on one operational point. It warns that instances running runtime versions below a specific threshold remain vulnerable and recommends verifying that the update has arrived. Microsoft's statement maintains that the mitigation requires no customer action, and that difference in criteria deserves independent verification.

Another version, unverified, is circulating on administrators' forums. One official described access to a key vault with a valid administrator token and attributed the origin to an authentication flaw in a legacy interface that generated no logs. The company has not confirmed that chain, so it should be treated as a hypothesis rather than a diagnosis.

What to do this week in any APIM

The first step is to take inventory and the second is to assume the list will be incomplete. If the organization has Classic instances, it should know how many there are, what secrets they store and what services depend on them. The v2 tiers are not affected, and that fact can turn the inventory into an argument for migrating rather than patching.

The second step is to move secrets to a dedicated vault and leave only references in APIM. The recommendation existed before the incident and now has a practical demonstration: a secret referenced from Key Vault does not travel in the service configuration and can be rotated without touching the gateway.

The third is to review logs with specific questions and with a time window covering at least the two weeks before November 18. Were there calls to the management plane from unexpected addresses? Were named values listed or modified? Were subscription keys used from new locations? The threat-hunting queries circulating since Monday help to get started, provided they are adapted to the available telemetry and to each subscription's resource names.

A recurring pattern

The episode fits a pattern that was already seen with the Microsoft 365 outage and with other advisories from the same week: the provider detects, mitigates and communicates on the same channel, while the customer discovers that their part of the work begins after the statement. In the cloud, shared responsibility has fine print that is better read with the incident in front of you.

There is a detail worth noting in the inventory. Classic instances that no longer receive traffic still exist, still store secrets and rarely appear in architecture diagrams, so the inventory must include what no one remembers creating.

An uncomfortable question remains that Microsoft does not answer in the advisory. If the global mitigation was applied on November 19, how many instances remained exposed until their runtime was updated, and who bears the cost of rotating credentials that had been in production for months? The security of Azure models and services makes headlines for other reasons, but the answer to that question says more about the platform's real risk.

José Maldonado

Author

José Maldonado

Activist and blogger on technology, free software and blockchain.

The latest
Colette Kress took the heat; Jensen Huang asked for a laptop

Keep reading