Skip to content
OAuth / SSO Disclosed report Intermediate

old password can be used for creating access token given refresh token

GitLab

Originally disclosed on GitLab

  • Fixed in 19 hours
  • Disclosed after 19 hours

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #1882631 by vaib25vicky on 2023-02-22, assigned to @cmaxim:

Report | How To Reproduce

Report

Summary

We can use resource owner password credentials flow to obtain new access token for the user by using old password which is no longer active in his account.

Steps to reproduce
  1. Creates a new access token
Bash
echo  'grant_type=password&username={USER_NAME}&password={PASSWORD}'   >  auth.txt

curl --data "[@]auth.txt" --request POST "https://gitlab.com/oauth/token"  
  1. In response you will get access token and refresh token. Copied the refresh token
  2. Go to your Gitlab account password setting and change your password https://gitlab.com/-/profile/password/edit
  3. Run follow commands in your terminal. Use the old password that you've used in step 1.
Bash

echo 'username={Username}&password={Password}&refresh_token={Refresh_Token}&grant_type=refresh_token' > auth.txt

curl --data "[@]auth.txt" --request POST "https://gitlab.com/oauth/token"  
  1. After success, you'll get a new access token.

Impact

old password can be used for creating access token given refresh token

How To Reproduce

Please add reproducibility information to this section:

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

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

What is known

A medium-severity OAuth / SSO bug in gitlab.com. GitLab made it public on 24 February 2023.

About OAuth / SSO

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

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

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.