# GHSA-xmh9-rg6f-j3mr: Verification flaw in Solid identity-token-verifier

> Attackers can spoof DPoP proofs to bypass token binding and gain unauthorized access to Solid Pods using the vulnerable identity-token-verifier library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Mar 2021

## What is GHSA-xmh9-rg6f-j3mr?

GHSA-xmh9-rg6f-j3mr is an authentication bypass vulnerability in @solid/identity-token-verifier, published on 12 Mar 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact
#### Severity
Any Pod on a Solid server using a vulnerable version of the identity-token-verifier library is at risk of a spoofed Demonstration of Proof-of-Possession (DPoP) token binding. This vulnerability could give total and complete access to a targeted Pod.

#### Summary
A verification flaw in the implementation of the identity token verifier library (https://github.com/solid/identity-token-verifier) allows DPoP proofs to be spoofed. 

DPoP proofs are used to bind access tokens to a private key meant to be in sole possession of a specific user. Instead of verifying against the hash of an embedded public key, the library instead verifies against a field that an attacker can modify to spoof another user’s DPoP. 

A stolen DPoP proof, when used in the right context, therefore allows the rebinding of a DPoP-bound access token. Any attacker in possession of a targeted access token could build an attack environment to replay it on any Pod service with this vulnerability.  

### Patches
A new version 0.5.2 of identity-token-verifier fixes the verification: https://github.com/solid/identity-token-verifier/blob/7e18d86d65ee681e8ae912b6a032a1bae3cae570/src/lib/DPoP.ts#L25-L35

### Workarounds
None

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

### For more information
If you have any questions or comments about this advisory:
* Open an issue in the [identity-token-verifier](https://github.com/solid/identity-token-verifier/) repository.
* Email: info@solidproject.org

## Which versions are affected by GHSA-xmh9-rg6f-j3mr?

2 open source packages ship an affected version, including @solid/identity-token-verifier.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@solid/identity-token-verifier` | npm | All versions | 0.5.2 |
| `@solid/identity-token-verifier` | npm | All versions | 0.5.2 |

## How do I fix GHSA-xmh9-rg6f-j3mr?

Upgrade @solid/identity-token-verifier to 0.5.2 or later.

## Is GHSA-xmh9-rg6f-j3mr being exploited?

There is no known exploitation of GHSA-xmh9-rg6f-j3mr in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-xmh9-rg6f-j3mr and fix it if it is affected.

What it is: GHSA-xmh9-rg6f-j3mr is an authentication bypass vulnerability in @solid/identity-token-verifier, published on 12 Mar 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-xmh9-rg6f-j3mr in the wild and no public exploit code.

Affected packages and fixed versions:
- @solid/identity-token-verifier (npm): affected all versions; fixed in 0.5.2
- @solid/identity-token-verifier (npm): affected all versions; fixed in 0.5.2

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-xmh9-rg6f-j3mr/ (Markdown: https://insights.sbomify.com/GHSA-xmh9-rg6f-j3mr/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-xmh9-rg6f-j3mr

---
From sbomify Insights: https://insights.sbomify.com/GHSA-xmh9-rg6f-j3mr/
Summaries are generated and may contain mistakes; the official description above is the record.
