Skip to content
Security & Trust

Cycode: Microsoft's WinGet triage tool sent a moderator's token to any URL (now patched)

Cycode says one pull request could have exposed a GitHub credential. The flaw sat in automation, not in a person.

W
WebPulse Newsroom
AI-assisted · 4 min read
Share on X LinkedIn
Cycode: Microsoft's WinGet triage tool sent a moderator's token to any URL (now patched)
In brief
  • Cycode reports that a script Microsoft moderators used to triage WinGet pull requests sent their GitHub token to any address a submitter supplied. The flaw sat in a moderator tool.
  • Cycode and InfoWorld report a patch, and InfoWorld reports no evidence of exploitation. The sources include no Microsoft statement.
  • Leaders should ask which internal tools attach credentials to outgoing requests, and whether any use broad, long-lived tokens.

The weak point was a script, not a person

Many defences focus on tricking people. This case did not need that. Cycode's research describes a script working as written, with no check on where it sent the token.

Cycode's researchers found a flaw in the internal triage tool used by Microsoft moderators who review submissions to WinGet. WinGet is Microsoft's free, open-source command-line package manager. Cycode puts its reach at over 1.4 billion active devices running Windows 10 and Windows 11.

That number describes WinGet's install base. The flaw sat in a moderator's tool, not on those devices. It does not measure how many users were affected.

Cycode and InfoWorld both report that the flaw is patched. InfoWorld reports no evidence it was exploited in the wild. The sources include no statement from Microsoft.

How a pull request became a stolen key

WinGet's app catalog lives in a public GitHub repository called winget-pkgs. A small group of Microsoft moderators reviews community pull requests, which are proposed changes. Cycode says every WinGet installation ultimately trusts what those moderators merge.

The moderators' triage tool is a PowerShell script called ManualValidationPipeline.ps1. Cycode found that it attached the moderator's GitHub Personal Access Token to every web request. A Personal Access Token is a secret that proves identity. The script did not check where the request was going.

Cycode describes four steps. First, an attacker opens a pull request with an installer URL that points at their own server. Second, Microsoft's Azure DevOps validation pipeline tries to fetch that URL. The attacker's server returns an error on purpose. Third, the pipeline adds a URL-Validation-Error label. That label makes the moderator's background loop send a request to the attacker's URL, with the token attached. Fourth, the attacker reads their own server logs and takes the token.

Cycode says one condition must hold. At least one moderator must be running the tracker in its normal mode, a continuous background loop that waits for work.

Cycode adds a detail that stands out. The tool also posts a comment on the pull request, noting the status code it got back. The attacker would see public proof that the trick worked.

Why the size of the token matters

What follows is Cycode's assessment of what the token could allow. Cycode says the credential was a Classic Personal Access Token with the workflow scope. In its words, this is "a full identity credential", not one tied to a single repository.

Cycode's view is that the token carries the moderator's own rights on GitHub. It says an attacker could push malicious manifests to winget-pkgs and approve their own pull requests. In its telling, that opens the way to backdoored installers across 14,000 exposed packages, each appearing to carry a trusted Microsoft moderator's approval.

Cycode also says an attacker could write to other Microsoft repositories the moderator can access. It adds that the workflow scope would let them edit GitHub Actions workflows and run code on build systems. Cycode does not state which other repositories the moderator can reach. The company does not report any such use.

A safer pattern already existed

The tool has a C# version. Cycode says its web helper defaults the Authorization setting to false. A credential goes out only when a caller asks for it. The PowerShell version lacked that safeguard. Cycode says it even sent the token to githubstatus.com.

Cycode says Microsoft's fix, Pull Request #456300, attaches the token only when the request host is one of three GitHub addresses: api.github.com, github.com or raw.githubusercontent.com. Cycode also recommends a Fine-Grained Token limited to the winget-pkgs repository. In Cycode's view, a leak would then expose one public catalog, not a person's whole identity.

The idea behind the incident

Cycode argues that automation removes the person who would have clicked the bad link. It also removes the person who would have noticed something odd. No single step looks dangerous: a label, a loop, a helper that adds a token. The risk comes from linking them.

Our own view goes a step further. An unattended loop trusts every input it is built to read, and in this case a stranger could write that input. Teams audit people and internet-facing servers closely. Back-office loops that act on text from strangers, while holding a staff member's credentials, get far less scrutiny.

Cycode says it found the flaw while building AI-based offensive security tools. Cycode sells such tools, so weigh that claim with that in mind. Its warning is that attackers can use the same kind of models to chain small flaws.

The lesson here is that a credential should belong to a destination, not to a function. Fixing one script does not tell you whether your own tools share the pattern.

Questions to put to your team

Ask which internal tools attach credentials to outgoing requests. Ask whether each one checks the destination first. Ask where long-lived, staff-level tokens still run in unattended loops. Ask whether automated triage ever acts on text a stranger can write, such as a URL in a submission.

Finally, ask what a leaked token could reach today. If the honest answer is "everything that person can", the token is too broad.

Produced by the WebPulse Newsroom with AI assistance from the original reporting credited below, and checked against that source by our editorial review. How we use AI.
Original reporting: Cycode.