Skip to content
Info disclosure Advisory Beginner CVE-2022-39304

GHSL-2022-061: Bearer token disclosure in ghinstallation - CVE-2022-39304

When an error occurs during token renewal, the full bearer token for the app is printed. This could lead to disclosure of the app token and hijacking of the app.

ghsecuritylab Follow

Originally disclosed on GitHub Security Lab

When an error is encountered during token renewal, the full bearer token for the app is printed. This output can make its way to a Slack channel or similar apps.

ghsecuritylab, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the error message included the token value because the token was part of the error returned by the refresh function.

Impact

This issue may lead to disclosure of the app token and hijacking of the app.

What the attacker needed

Error during token renewal; error output visible to attacker

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A bearer token is like a password that lets a program access an app. Here, if something went wrong while getting a new token, the program accidentally printed the token in an error message. Anyone who saw that message could use the token to take over the app.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by ghsecuritylab

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.