# GHSA-wpfr-6297-9v57: User object created with invalid provider data in GoTrue

> GoTrue creates user objects with invalid provider metadata, potentially allowing security bypasses if that metadata is used for authorization decisions.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Feb 2022
- **Also known as:** GO-2022-0365

## What is GHSA-wpfr-6297-9v57?

GHSA-wpfr-6297-9v57 is a vulnerability in github.com/netlify/gotrue, published on 9 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
_What kind of vulnerability is it? Who is impacted?_

Under certain circumstances a valid user object would have been created with invalid provider metadata.

This vulnerability affects everyone running an instance of GoTrue as a service. We advise you to update especially if you are using the provider metadata from the user object to secure other resources.

### Patches
_Has the problem been patched? What versions should users upgrade to?_

A patch is available with the release of version [1.0.1 on Github](https://github.com/netlify/gotrue/releases/tag/v1.0.1).

### Workarounds
_Is there a way for users to fix or remediate the vulnerability without upgrading?_

If you don't rely on the provider metadata in the user object, you might not be affected. We still strongly recommend upgrading.

### References
_Are there any links users can visit to find out more?_

This problem was initially found and reported by the team at Supabase: https://github.com/supabase/gotrue/security/advisories/GHSA-5hvv-9cqv-894r. We want to thank them for the cooperation around this report.

In contrast to their advisory, we decided to set the severity to "Moderate" since the provider metadata is not an inherent security feature of this GoTrue codebase or the Netlify ecosystem.

### For more information
If you have any questions or comments about this advisory:
* Email us at [security@netlify.com](mailto:security@netlify.com)

## Which versions are affected by GHSA-wpfr-6297-9v57?

3 open source packages ship an affected version, including github.com/netlify/gotrue.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/netlify/gotrue` | Go | All versions | 1.0.1 |
| `github.com/netlify/gotrue` | Go | All versions | 1.0.1 |
| `github.com/netlify/gotrue` | Go | All versions | 1.0.1 |

## How do I fix GHSA-wpfr-6297-9v57?

Upgrade github.com/netlify/gotrue to 1.0.1 or later.

## Is GHSA-wpfr-6297-9v57 being exploited?

There is no known exploitation of GHSA-wpfr-6297-9v57 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-wpfr-6297-9v57 and fix it if it is affected.

What it is: GHSA-wpfr-6297-9v57 is a vulnerability in github.com/netlify/gotrue, published on 9 Feb 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-wpfr-6297-9v57 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/netlify/gotrue (Go): affected all versions; fixed in 1.0.1
- github.com/netlify/gotrue (Go): affected all versions; fixed in 1.0.1
- github.com/netlify/gotrue (Go): affected all versions; fixed in 1.0.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-wpfr-6297-9v57/ (Markdown: https://insights.sbomify.com/GHSA-wpfr-6297-9v57/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-wpfr-6297-9v57

---
From sbomify Insights: https://insights.sbomify.com/GHSA-wpfr-6297-9v57/
Summaries are generated and may contain mistakes; the official description above is the record.
