Skip to content

Flaw in Microsoft's WinGet Tooling Could Have Exposed a Moderator's GitHub Token

Cycode researchers found a now-patched zero-click flaw in the open-source Windows Package Manager (WinGet) that could have let attackers take a Microsoft moderator's GitHub access token via a single pull request.

3 min readBased on 1 source30 views

TL;DR

  • Researchers at Cycode found a critical, now-patched flaw in the open-source Windows Package Manager (WinGet) that needed no user interaction.
  • A crafted pull request could have caused an internal Microsoft triage script to send a moderator's GitHub token to an attacker-controlled server.
  • Microsoft has fixed the PowerShell helper, but experts say the underlying token model and internal automation remain risky.

What happened

WinGet is Microsoft's free command-line tool for finding, installing, upgrading and removing applications. According to Cycode, it runs on more than 1.4 billion active devices with Windows 10, Windows 11 and Windows Server 2025. Its catalog lives in a public GitHub repository, and a small group of Microsoft moderators reviews community pull requests against it. Default Windows installations trust the changes those moderators approve.

The weakness was not in the public repository itself but in the moderators' internal triage tool, a PowerShell helper. It attached the moderator's personal GitHub access token to outgoing HTTP requests without checking the destination host. An attacker only needed to supply a URL under their control.

How the chain worked

The attack relied on automation reacting to what a pull request contained. An attacker could submit a request whose installer URL pointed to their own server. Microsoft's Azure DevOps validation pipeline tried to fetch that address, and the attacker's server returned an error on purpose. The pipeline then added a validation error label to the pull request.

That label made the moderator's script run a routine that sent a HEAD request to the attacker's address through an authenticated HTTP helper. The helper attached the token automatically. The attacker only had to read their own server logs to collect it. Cycode notes that the token is a full identity credential, so anything the employee can do on GitHub, the token could do too. A precondition was that a moderator had the triage tracker running in a continuous background loop, which the tool is designed to do.

Cycode's researchers stressed that there is currently no evidence the flaw was exploited in the wild. Had it been, the reach would have been large. An attacker with the token could have pushed malicious manifests, approved their own pull requests and planted backdoored installers across roughly 14,000 exposed packages. They could also have written to other Microsoft repositories the moderator could access and altered GitHub Actions workflows to run code remotely and steal secrets.

Fix and remaining concerns

Microsoft has patched the PowerShell helper so tokens are attached only when the request host is an authorized GitHub endpoint, such as api.github.com, github.com or raw.githubusercontent.com. Cycode notes that Microsoft's C# version of the same tool did not share the flaw.

However, Cycode's Moriel Harush called the underlying credential model "fundamentally flawed" and described reliance on classic personal access tokens as a "severe liability." Classic tokens are broad, long-lived credentials, so a leak can expose far more than one repository.

Lessons from security analysts

Frank Dickson of Dickson Research called the case a near miss but a serious one. He said an attacker could have published malware carrying Microsoft's approval, and that the activity would have looked like routine work in logs. An IT team installing an approved package from an approved source would have had no obvious signal.

Dickson argued that enterprise scripts and bots are often weak points because they hold production-level keys but receive little review. He recommended that security teams inventory every script and bot holding a token, ask what each key could do if misused, and replace broad, long-lived tokens with narrow, short-lived ones bound to specific services. Harush offered a similar principle: a leaked token's impact should be limited to one repository and the minimum permissions needed.

Why it matters

For developers who maintain public packages or internal automation, the incident is a reminder that bots and triage scripts are part of the attack surface. Any tool that attaches credentials to outgoing requests should check the destination before doing so. Teams should review which tokens their automation holds, what those tokens can reach, and whether classic personal access tokens can be replaced with narrower alternatives. For anyone who depends on public package registries, the case also argues for verifying packages rather than trusting a registry's badge alone.

Sources

This article was written by Blozhik from the reporting below. Read the originals for full detail.

InA single pull request could have handed attackers the keys to Microsoft’s software supply chainInfoWorld
Was this useful?

Keep reading

Discussion · 0

Sign in to join the discussion. Liking does not need an account.Sign inRegister
Loading comments…
blozhikDeveloper news from across the web, explained. Every story links to its original sources.