Attackers have exploited a vulnerability in Azure API Management (APIM) to steal credentials stored in customers’ instances, Microsoft has warned.

Among the victims are several Norwegian organizations, including energy companies Equinor and Skagerak Energi, and organizations in other sectors and outside Norway, the country’s National Security Authority (NSM) confirmed.

APIM Classic tiers affected

APIM is a gateway that sits in front of an organization’s APIs and handles authentication, routing and rate limiting. To call the backend services behind it, the gateway often needs to hold their credentials.

Microsoft’s advisory, delivered to customers via the Azure Portal, says that, on November 18, Microsoft identified a “security issue” affecting APIM Classic tiers that could allow unauthorized access to certain management functionality, “if the service was not configured according to documented security best practices.”

While Microsoft fixed the flaw and closed the access path the next day, it discovered that credentials or configuration secrets associated with some customers’ API Management resources may have been accessed by an unauthorized party.

Microsoft says Classic-tier instances without its recommended network integration, or with secrets stored in APIM rather than in Azure Key Vault, may have had their named values, identity-provider and OpenID Connect client secrets, subscription keys and direct management API tokens accessed.

“If someone obtains a credential from that configuration, they may be able to use it directly against the service it protects, outside APIM. What they can reach depends on the credential’s permissions and whether it is still valid,” security researcher Anders Kristiansen explained.

The vulnerability does not impact Azure API Management v2 tiers, Microsoft added.

What to do?

Microsoft’s remediation does not invalidate the customer credentials that may have been accessed by the attackers before Microsoft rolled out the fix. It’s on affected organizations to do that and check if the credentials have been misused to access their resources.

The Norwegian National Security Authority advised everyone using Azure API Management to assume that their secrets and named values have been compromised, and to rotate all tokens and secrets. They should also check whether their APIM instance has been updated to (fixed) runtime versions 0.52.31936 or higher, or 0.53.31938 or higher.

NSM advises organizations whose instance hasn’t been updated to contact Microsoft directly, and asked organizations that have been compromised to contact them.

“It is also important that organizations identify what information sits behind their APIM instance, so they can determine the potential scope if evidence of compromise is found,” the NSM added.

Kristiansen published (and is keeping updated) helpful what-to-do instructions for affected organizations and advice on what to search for in which logs.

Subscribe to our breaking news e-mail alert to never miss out on the latest breaches, vulnerabilities and cybersecurity threats. Subscribe here!