Lucene search

K
hackeroneMikaelgundersenH1:1784162
HistoryNov 25, 2022 - 11:50 a.m.

Nextcloud: OAuth2 "authorization_code" is valid indefinetly

2022-11-2511:50:10
mikaelgundersen
hackerone.com
$100
11
nextcloud
oauth2
security best practices
authorization_code
rfc 6749
impact
attacker
bugbounty

AI Score

7

Confidence

Low

EPSS

0.001

Percentile

19.8%

Your OAuth2 endpoint is not at all following best practices. When the authorization_code is generated it is stored without a timeout. Now according to https://www.rfc-editor.org/rfc/rfc6749#section-4.1.2 10 minutes is recommended. As the goal is that is gets used almost directly or not at all.

Now there is a debate maybe to have on the 10 minutes. But there is kind of a big difference between 10 minutes and no timeout at all.

Impact

An attacker that obtains this code could possibly easily redeem it in the future.
Or an attacker could just keep trying codes.

AI Score

7

Confidence

Low

EPSS

0.001

Percentile

19.8%