Описание
Email Validation Bypass And Preventing Sign Up From Email's Owner
Summary
Email validation can easily be bypassed because verify_email_enabled
option enable email validation at sign up only.
A user changing it's email after signing up (and verifying it) can change it without verification in /profile
.
This can be used to prevent legitimate owner of the email address from signing up.
Another way to prevent email's owner from signing up is by setting Username as an email: When a new user is registrering, they can set two different email addresses in the Email and Username field, technically having 2 email addresses (because Grafana handles usernames and emails the same in some situations), but only the former is validated.
Here user a prevents owner of bar@example.com to signup.
Details
I don't know exact location but this is related to PUT /api/user handler.
PoC
Bypass email validation:
- Start a new grafana instance using latest version
- Sign up with email foo@example.
- Login to that account.
- Go to profile and change email to bar@example.com
- That's it, your using an email you don't own.
Prevent email's owner from signing up:
- Start a new grafana instance using latest version
- Sign up with email foo@example.
- Login to that account.
- Go to profile and change username (not email) to bar@example.com
- Signout.
- Try to sign up with email b@example.com
- Warning popup "User with same email address already exists"
K6 script (with verify_email_enabled
set to false
):
Impact
Bypass email verification. Prevent legitimate owner from signing up.
Пакеты
github.com/grafana/grafana
>= 2.5.0, < 9.5.16
9.5.16
github.com/grafana/grafana
>= 10.0.0, < 10.0.11
10.0.11
github.com/grafana/grafana
>= 10.1.0, < 10.1.7
10.1.7
github.com/grafana/grafana
>= 10.2.0, < 10.2.4
10.2.4
github.com/grafana/grafana
>= 10.3.0, < 10.3.3
10.3.3
Связанные уязвимости
A user changing their email after signing up and verifying it can change it without verification in profile settings. The configuration option "verify_email_enabled" will only validate email only on sign up.
A user changing their email after signing up and verifying it can change it without verification in profile settings. The configuration option "verify_email_enabled" will only validate email only on sign up.
A user changing their email after signing up and verifying it can change it without verification in profile settings. The configuration option "verify_email_enabled" will only validate email only on sign up.
A user changing their email after signing up and verifying it can chan ...
Уязвимость базовой системы аутентификации веб-инструмента представления данных Grafana, позволяющая нарушителю обойти проверку электронной почты и помешать законным владельцам электронной почты зарегистрироваться