VDB
Sign up
HIGH

GHSA-4227-9989-jrhx

Perses's missing authorization in datasource proxy allows cross-scope secret disclosure

Quick fix

GHSA-4227-9989-jrhx — github.com/perses/perses: upgrade to the fixed version with the command below.

go get github.com/perses/perses@v0.54.0-rc.0

Details

### Impact

The datasource proxy authorizes the caller on the Datasource scope, then resolves and decrypts any Secret named in the request body with no Secret-scope check.

Datasource and Secret are distinct, independently grantable role scopes, so an operator can grant datasource access without secret access. The proxy and the service to create a datasource does not verify that the operator has the correct right.

A user holding only `GlobalDatasource:create` can create a `GlobalDatasource` and attached to it a `GlobalSecret` without having the right to get access to. The user can also do the same by using the `unSaved datasource` feature proposed by the proxy used to verify the connectivity to the datasource before creating the resource.

As soon as you can attach a secret that you don't have right to see, you can then create a Datasource that you control and then read anything send by Perses. Which include the secret in plain text. You can then have access to the secret without being granted to.

The project-scoped variant does the same within a project.

### Patches The proxy and the service to create the datasource is verifying if you have the right to read a secret if a secret is attached to the datasource. This is patch in v0.54.0-rc.0

### Workarounds This issue can be avoided by using the provisioning to create the datasource and by removing the right to create datasource.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/github.com/perses/perses
Introduced in: 0.43.0Fixed in: 0.54.0-rc.0
Fixgo get github.com/perses/perses@v0.54.0-rc.0

References