Azure APIM: A flaw exposed customer secrets before the patch

Azure APIM: A flaw exposed customer secrets before the patch

A flaw in Azure API Management allowed an unauthorized actor to access secrets stored in some Classic instances before Microsoft closed the access path on November 19. Norwegian authorities have linked the vulnerability to attacks against energy companies and warn that the extent of the exploitation remains unclear.

What could be exposed in Azure API Management

Azure API Management (APIM) is Microsoft's service for publishing, protecting, monitoring, and managing application programming interfaces. According to Microsoft, the vulnerability affected the Developer, Basic, Standard, and Premium tiers of APIM Classic. The company said the Classic Consumption tier and all APIM v2 tiers were not affected.

The issue could allow unauthorized access to certain management functions when Classic instances did not follow Microsoft's security recommendations. With this access, attackers could perform administrative operations, including retrieving secrets stored in the service.

Potentially exposed data included secrets stored in Named Values, client secrets associated with identity providers and OpenID Connect providers, subscription keys, and tokens used to call the management APIs directly. Depending on their permissions, the credentials could also provide access to other connected applications, services, or systems.

Microsoft said it detected the vulnerability on November 18 and closed the unauthorized access on November 19. The mitigation was deployed to Microsoft-hosted API Management instances and, according to the company, does not require any action by customers to be applied. However, it does not revoke secrets that someone may have obtained before the fix.

Stolen credentials can be used outside APIM

Norway's National Security Authority (NSM) said an unknown actor actively sought access tokens, secrets, and Named Values stored in APIM. The agency said Norway's energy sector first detected the vulnerability and that organizations in other sectors, both inside and outside the country, have also been affected.

Security researcher Anders Kristiansen warned that a credential extracted from APIM could be used directly against the service it protects, without going through the platform. The extent of access would depend on the credential's permissions and whether it remained valid.

NSM urged organizations to assume that their secrets and Named Values had been exposed and to rotate all tokens and secrets. It also recommended identifying what information and systems are accessible behind each instance to estimate the potential scope if signs of compromise are found.

Azure APIM: una brecha expuso secretos de clientes antes del parche
© Nasjonal sikkerhetsmyndighet

Version checks recommended by Norway

NSM recommended verifying that each instance had received the update and published thresholds for interpreting the RuntimeVersion field. The agency said versions below those thresholds remained vulnerable and advised contacting the provider if an instance had not been updated.

RuntimeVersionStatus according to NSM
0.52.x, with x equal to or greater than 31936Patched
0.53.x, with x equal to or greater than 31938Patched
Versions below those thresholdsRemain vulnerable
Patterns such as 0.53.4608.0 or 0.52.4150.0APIM v2 or Consumption tier; the threshold does not apply

There is a difference in emphasis between the public guidance. Microsoft said the mitigation had been deployed to its hosted instances and that no action was needed to receive it; NSM, by contrast, stressed the need to check the runtime version. Microsoft did not explain why the Norwegian authority continued to warn about instances that might still be unpatched.

NSM also asked organizations with signs or confirmation of compromise to contact the agency. In its view, disclosure of the vulnerability could encourage other actors to try the same access path. The authority rated the national cyber risk level as high and noted that the rapid expansion of artificial intelligence use affects the risk landscape.

Equinor and Skagerak Energi among those affected

Norwegian authorities linked the vulnerability to incidents at Equinor and Skagerak Energi. Equinor detected an attack on November 17, one day before Microsoft identified the flaw, and did not fully contain it until Friday, according to The Record. The incident disrupted some internal services, although oil and gas production continued as normal.

Equinor said there was no indication that data had been stolen or altered and that the attack did not appear to specifically target the company. NSM highlighted the company's role in early detection and in sharing information with the authorities and sector response teams.

Skagerak Energi, an electricity producer and distributor, reported a separate incident on November 18. The company said it did not affect its operations or electricity production and that it had found no indication that information had been compromised. The company is majority-owned by Statkraft, the Norwegian renewable energy company.

NSM said the vulnerability affects several Norwegian sectors and organizations in other countries. The extent of the exploitation has not been established, nor is it known whether the same actor was behind the incidents at the two energy companies.

Security recommendations and affected versions

Microsoft linked the exposure to Classic instances that did not follow its network security recommendations or that stored secrets directly in APIM instead of referencing them from Azure Key Vault, a separate service for storing this type of information. The specific configuration could determine which credentials were within reach.

On Reddit, an administrator said their organization discovered the issue after detecting unauthorized access to Azure Key Vault using a valid administrator token. They attributed the access to an authentication bypass in a legacy API and said that API did not generate useful logs for customers. They also said Microsoft initially attributed the activity to leaked credentials. BleepingComputer said it had not independently verified these claims.

NSM said it had no indication that compromises or attempted compromises had affected the delivery of services by Norwegian organizations. Even so, it advised treating secrets and named values as exposed, checking for updates, and reviewing the systems they provided access to. Microsoft, for its part, said it had notified potentially affected customers and shared guidance to help secure their systems.

The incident came to light just days after Microsoft confirmed another breach in Entra Connect Health, in which attackers exploited a vulnerability to steal tenant configuration information and administrators' email addresses. In the APIM case, the immediate task for affected organizations is to review credentials and confirm that their instances are running the fixed version.

Sources: BleepingComputer, SecurityWeek, The Record, Nasjonal sikkerhetsmyndighet, theregister