A vulnerability in the Classic version of Azure API Management was exploited to steal customers’ stored API credentials, including at the Norwegian energy companies Equinor and Skagerak Energi.
Microsoft is warning customers about a vulnerability in the Classic tiers of Azure API Management (APIM) that was exploited to steal stored secrets. The company discovered the flaw on 18 November and closed off the access route a day later, writes BleepingComputer, which was able to view Microsoft’s security advisory to customers. On instances that were not configured according to the recommended security guidelines, attackers could use the flaw to perform administrative actions.
The Developer, Basic, Standard and Premium tiers of APIM Classic are vulnerable. The Consumption tier and all tiers of APIM v2 are not affected. The risk mainly applied to configurations that stored secrets directly in APIM, without retrieving them via Azure Key Vault, reports The Register. Possibly leaked data includes named values, client secrets of identity providers and OpenID Connect providers, subscription keys and tokens for the direct management APIs.
Energy sector discovered the flaw
The Norwegian National Security Authority (NSM) links the vulnerability to attacks on Norwegian companies, including gas giant Equinor and hydropower company Skagerak Energi. According to NSM, an unknown actor actively searched APIM for access tokens, secrets and named values. The Norwegian energy sector was the first to discover the flaw. Equinor disclosed the attack on 17 November, a day before Microsoft found the flaw, and says it has no indication so far that data was stolen or altered.
“It is still uncertain how extensive the exploitation of the vulnerability is and has been,” says Martin Albert-Hoff, department director for operational cybersecurity at NSM. According to NSM, the flaw affects multiple sectors, including outside Norway. The authority says the rapidly growing use of AI increases the risk that other actors will still try to exploit it.
Stolen credentials remain valid
Microsoft itself rotated the keys and credentials it manages. Customer credentials that were captured before the intervention on 19 November do remain valid. Microsoft asks affected customers to replace potentially leaked credentials immediately, review the logs and investigate suspicious activity in the systems that can be reached with those credentials.
Anyone who obtains a credential from the APIM configuration “can potentially use it directly against the service it protects, outside APIM,” writes security researcher Anders Kristiansen on his blog. He shares queries to detect abuse in the logs and recommends disabling the old direct Management API. Customers The Register spoke to warn that forgotten development and test instances could make even more organisations vulnerable.
Check Azure API Management
NSM asks every organisation with APIM to assume that its secrets and named values have leaked, to rotate all tokens and secrets and to map out what information sits behind each instance. Whether an instance has been patched can be read from the RuntimeVersion at the path /internal-status-0123456789abcdef of your own gateway. Version 0.52.x is safe from 31936, version 0.53.x from 31938. With a lower number, NSM asks you to contact the vendor.
Microsoft confirms to BleepingComputer that the fix has been rolled out to all instances hosted by Microsoft, without any action from the customer. Microsoft did not clarify why NSM nevertheless recommends checking the runtime version.
