A helper script used by WinGet moderators attached their GitHub token to every request, including those sent to an attacker's server
Researchers at Cycode showed how an ordinary contribution to Microsoft's package catalogue could have opened the door to some 14,000 Windows installers.
The process around WinGet, the Windows package manager, contained a serious flaw that would have let an outsider gain access to Microsoft's software catalogue without any user interaction. CSO Online and InfoWorld reported this on Thursday, based on research by security firm Cycode. The problem was not in WinGet itself but in an internal PowerShell tool that moderators use to review contributions to the public catalogue.
That script added the moderator's personal GitHub token to every outgoing request without checking which server it was going to. An attacker could submit a contribution with a download address on their own server. If the automated check then failed, the contribution received a label, prompting the moderator's script to contact that server and leaving the token in the attacker's logs. This only worked if a moderator kept the tool running continuously in the background.
With such a token, Cycode says, an attacker could have approved their own packages, replaced installers for around 14,000 packages and modified other Microsoft repositories. Microsoft has changed the script so that the token is only sent to GitHub servers. There is no evidence the flaw was exploited. Tech Champion notes that the case mainly shows how risky broad access tokens are in automated checks.